import clsx from 'clsx'; import { ReactNode } from 'react'; import { ModalType } from './types'; import { useModalContext } from './Modal'; import styles from './ModalHeader.module.css'; interface Props { title: ReactNode; modalType?: ModalType; } export function ModalHeader({ title, modalType }: Props) { useModalContext(); return (
{modalType && (
)} {typeof title === 'string' ? (
{title}
) : ( title )}
); }