import type { ReactNode } from 'react'; import { Button } from '../button/Button'; import type { ModalRootProps } from './Modal'; import { ModalBody, ModalFooter, ModalHeader, ModalRoot } from './Modal'; interface AlertModalProps { isOpen?: ModalRootProps['isOpen']; onOpenChange?: ModalRootProps['onOpenChange']; title?: string; content?: ReactNode; confirmText?: string; onConfirm?: () => void; } export const AlertModal = (props: AlertModalProps) => { const { isOpen, onOpenChange, title, ...contentProps } = props; return ( {({ close }) => } ); }; function AlertModalContent({ close, title, content, confirmText = '확인', onConfirm, }: { close: () => void; title?: string; content?: ReactNode; confirmText?: string; onConfirm?: () => void; }) { const handleConfirm = () => { onConfirm?.(); close(); }; return ( <> {title && {title}}

{content}

); }