chore(SW-3145): Move Title and Subtitle to design-system * Move Title and Subtitle to design-system * Fix export Approved-by: Linus Flood
24 lines
708 B
TypeScript
24 lines
708 B
TypeScript
import { Button as ButtonRAC } from "react-aria-components"
|
|
|
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
|
|
|
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}>
|
|
<Subtitle>{title}</Subtitle>
|
|
<ButtonRAC className={styles.close} onPress={handleClose}>
|
|
<MaterialIcon icon="close" color="Icon/Interactive/Placeholder" />
|
|
</ButtonRAC>
|
|
{children}
|
|
</header>
|
|
)
|
|
}
|