mars-v2-frontend/src/components/Modals/Account/AccountDeleteAlertDialog.tsx
Bob van der Helm 6300af5b35
Styling alert dialog (#441)
* 🐛 text fix on fund for new account

* 🐛 make toggle account-wide lending on new-account

* 💅🏼Update styling of alertDialogs
2023-09-08 09:43:42 +02:00

36 lines
881 B
TypeScript

import { useEffect } from 'react'
import { Enter, InfoCircle } from 'components/Icons'
import useAlertDialog from 'hooks/useAlertDialog'
interface Props {
title: string
description: string | JSX.Element
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
}