chore(BOOK-701): replace subtitle with typography * chore(BOOK-701): replace subtitle with typography * chore(BOOK-701): align center * chore(BOOK-701): change token * chore(BOOK-701): change text color * fix(BOOK-704): revert pricechange dialog changes * chore(BOOK-701): remove subtitle from package.json Approved-by: Matilda Landström
26 lines
771 B
TypeScript
26 lines
771 B
TypeScript
import { Button as ButtonRAC } from "react-aria-components"
|
|
|
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
|
|
|
import styles from "./header.module.css"
|
|
|
|
interface HeaderProps extends React.PropsWithChildren {
|
|
handleClose: () => void
|
|
title: string
|
|
}
|
|
|
|
export default function Header({ children, handleClose, title }: HeaderProps) {
|
|
return (
|
|
<header className={styles.header}>
|
|
<Typography variant="Title/Subtitle/lg">
|
|
<p>{title}</p>
|
|
</Typography>
|
|
<ButtonRAC className={styles.close} onPress={handleClose}>
|
|
<MaterialIcon icon="close" color="Icon/Interactive/Placeholder" />
|
|
</ButtonRAC>
|
|
{children}
|
|
</header>
|
|
)
|
|
}
|