import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import Typography, { TypographyProps, } from "@/components/ui/Typography/Typography"; import { useTimer, UseTimerOptions } from "@/hooks/timer/useTimer"; interface HeaderProps extends React.ComponentProps<"header"> { button?: React.ComponentProps; timerHookProps?: UseTimerOptions; timer?: TypographyProps<"span">; text?: TypographyProps<"p">; } export default function Header({ button, text, timerHookProps, timer, ...props }: HeaderProps) { const { time } = useTimer({ initialSeconds: timerHookProps?.initialSeconds || 600, ...timerHookProps, }); return (
{text && ( )} {time}
{button && (
); }