import { Button, Classes } from '@blueprintjs/core'; import { x } from '@xstyled/emotion'; import { Group, Icon } from '@/components'; import { useDrawerContext } from '@/components/Drawer/DrawerProvider'; import { useDrawerActions } from '@/hooks/state'; interface ElementCustomizeHeaderProps { label?: string; children?: React.ReactNode; } export function InvoiceSendMailHeader({ label, closeButton = true, }: ElementCustomizeHeaderProps) { const { name } = useDrawerContext(); const { closeDrawer } = useDrawerActions(); const handleClose = () => { closeDrawer(name); }; return ( {label && ( {label} )} {closeButton && (