mars-v2-frontend/src/components/Modals/Account/AccountDeleteAlertDialog.tsx
Bob van der Helm 93e725fc59
Merge FundAccount and AccountFund (#431)
*  Merge FundAccount and AccountFund

* fix build

* 🐛 fundAccount not showing, small typos/text corrections
2023-09-07 10:20:19 +02:00

36 lines
867 B
TypeScript

import { useEffect } from 'react'
import { Enter, InfoCircle } from 'components/Icons'
import useAlertDialog from 'hooks/useAlertDialog'
interface Props {
title: string
description: string
closeHandler: () => void
positiveButton: AlertDialogButton
}
export default function AccoundDeleteAlertDialog(props: Props) {
const { open: showAlertDialog } = useAlertDialog()
const { title, description, closeHandler, positiveButton } = props
useEffect(() => {
showAlertDialog({
icon: (
<div className='flex h-full w-full p-3'>
<InfoCircle />
</div>
),
title,
description,
negativeButton: {
text: 'Cancel',
icon: <Enter />,
onClick: closeHandler,
},
positiveButton,
})
}, [showAlertDialog, title, description, closeHandler, positiveButton])
return null
}