import React from 'react'; import type { DialogDescriptionProps } from '@radix-ui/react-dialog'; import { Description, Title } from '@radix-ui/react-dialog'; import type { ComponentPropsWithoutRef, PropsWithChildren } from 'react'; import { Heading } from 'components/shared/Heading'; import { modalTheme } from 'components/shared/Modal/Modal.theme'; import { WavyBorder } from 'components/shared/WavyBorder'; type ModalHeaderProps = ComponentPropsWithoutRef<'div'> & { className?: string; description?: string | React.ReactNode; descriptionProps?: DialogDescriptionProps; headingProps?: ComponentPropsWithoutRef<'h2'>; }; export const ModalHeader = ({ children, description, className, descriptionProps, headingProps, ...props }: PropsWithChildren) => { const { header, headerDescription, headerTitle } = modalTheme(); return ( <>
<Heading {...headingProps} className={headerTitle({ className: headingProps?.className })} > {children} </Heading> {description && ( {description} )}
); };