import { useState } from 'react'; import { Modal, ModalCloseButton, ModalProps } from '../modal'; import { StyledButtonWrapper, StyledConfirmContent, StyledConfirmTitle, StyledModalWrapper, } from '@/ui/confirm/styles'; import { Button } from '@/ui/button'; export type ConfirmProps = { title?: string; content?: string; confirmText?: string; // TODO: Confirm button's color should depend on confirm type confirmType?: 'primary' | 'warning' | 'danger'; onConfirm?: () => void; onCancel?: () => void; } & Omit; export const Confirm = ({ title, content, confirmText, confirmType, onConfirm, onCancel, }: ConfirmProps) => { const [open, setOpen] = useState(true); return ( { setOpen(false); onCancel?.(); }} /> {title} {content} ); }; export default Confirm;