Feedback
ConfirmModal
Confirmation dialog with useConfirmModal hook. Supports danger tone, alert mode.
Confirm dialog
Alert (no cancel)
Usage
import { useConfirmModal } from '@pulsesync/uikit'
const { confirm, alert, modal } = useConfirmModal()
<>
{modal}
<button onClick={async () => {
const ok = await confirm({
title: 'Delete?',
message: 'Cannot be undone.',
confirmText: 'Delete',
tone: 'danger',
})
}}>
Delete
</button>
</>