import { createPortal } from 'react-dom' import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material' import useConfirm from 'hooks/useConfirm' import { StyledButton } from 'ui-component/button/StyledButton' const ConfirmDialog = () => { const { onConfirm, onCancel, confirmState } = useConfirm() const portalElement = document.getElementById('portal') const component = confirmState.show ? ( {confirmState.title} {confirmState.description} {confirmState.confirmButtonName} ) : null return createPortal(component, portalElement) } export default ConfirmDialog