confirm-dialog — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited confirm-dialog (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Confirmation dialog with accept/reject actions. Built on Dialog. Also exports useConfirmDialog hook for imperative usage.
import { ConfirmDialog, useConfirmDialog } from 'reablocks';| Prop | Type | Default | Description | |
|---|---|---|---|---|
open | boolean | — | Whether the dialog is open | |
header | `string \ | ReactNode` | — | Dialog header |
content | `string \ | ReactNode` | — | Dialog body content |
confirmLabel | string | 'Confirm' | Confirm button text | |
cancelLabel | string | 'Cancel' | Cancel button text | |
variant | `'default' \ | 'destructive'` | 'default' | Visual variant — destructive colors the confirm button as error for delete-style actions |
onConfirm | () => void | — | Confirm callback | |
onCancel | () => void | — | Cancel callback (also closes the dialog) |
const [open, setOpen] = useState(false);
<ConfirmDialog
open={open}
header="Save Changes"
content="Save your changes before continuing?"
onConfirm={() => { save(); setOpen(false); }}
onCancel={() => setOpen(false)}
/>Use variant="destructive" for dangerous actions (delete, remove, etc.). The confirm button renders with the error color.
<ConfirmDialog
open={open}
variant="destructive"
header="Delete Item"
content="This action cannot be undone."
confirmLabel="Delete"
onConfirm={() => { deleteItem(); setOpen(false); }}
onCancel={() => setOpen(false)}
/>Imperative API for opening confirm dialogs without managing state:
const { openDialog, closeDialog, DialogComponent } = useConfirmDialog();
<Button onClick={() => openDialog({
header: 'Confirm Action',
content: 'Are you sure?',
onConfirm: () => { doAction(); closeDialog(); },
onCancel: () => closeDialog()
})}>
Delete
</Button>
<DialogComponent />| Property | Type | Description |
|---|---|---|
isOpen | boolean | Current open state |
openDialog | (props: OpenConfirmDialogProps) => void | Open with props |
closeDialog | () => void | Close the dialog |
DialogComponent | FC | Render this in your JSX |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.