fix(BOOK-325): Added refetch options to user.name query and refactored header
Approved-by: Linus Flood Approved-by: Matilda Landström
This commit is contained in:
@@ -1,16 +1,30 @@
|
||||
import { cx } from "class-variance-authority"
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import styles from "./menuButton.module.css"
|
||||
|
||||
import type { MainMenuButtonProps } from "@/types/components/header/mainMenuButton"
|
||||
import type { ComponentProps } from "react"
|
||||
|
||||
interface MainMenuButtonProps extends ComponentProps<typeof ButtonRAC> {
|
||||
isLoading?: boolean
|
||||
}
|
||||
|
||||
export default function MainMenuButton({
|
||||
className = "",
|
||||
className,
|
||||
isLoading,
|
||||
...props
|
||||
}: MainMenuButtonProps) {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.menuButton} ${className}`}
|
||||
{...props}
|
||||
/>
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<ButtonRAC
|
||||
type="button"
|
||||
className={cx(styles.menuButton, className, {
|
||||
[styles.loading]: isLoading,
|
||||
})}
|
||||
{...props}
|
||||
/>
|
||||
</Typography>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user