feat: refactor NewDates, clean up legacy code
This reverts commit 0c7836fa59.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
.header {
|
||||
display: grid;
|
||||
gap: var(--Space-x05) var(--Space-x2);
|
||||
grid-template-columns: 1fr auto;
|
||||
}
|
||||
|
||||
.close {
|
||||
align-items: center;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user