dialog.confirm
Asks the user to confirm or cancel one decision, with at most one field: type the project name to delete it
Read https://www.prongs.dev/docs/intents/dialog/confirm.md and tell me whether dialog.confirm fits what I am building.Dialog intents
Example
<Dialog intent="dialog.confirm" open={open} onClose={close} label="Delete this project?">
<Text intent="text.body">The project and all its pages will be gone for good.</Text>
<Action intent="action.delete" onClick={deleteProject}>Delete</Action>
</Dialog>Connections
Choosing between neighbours
If it is
Use
Asks the user to confirm or cancel one decision, with at most one field: type the project name to delete it
dialog.confirmA form or anything with several steps
dialog.task
For registry authors
Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.
What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.
How dialog.confirm resolves, and its definition
Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.
surface.overlayFloats over a dimmed page and starts its own stack of surfaces
surface-overlay m-auto rounded-lg border border-surface-border shadow-xl backdrop:bg-black/50
dialog.confirmAsks the user to confirm or cancel one decision, with at most one field: type the project name to delete it
w-[min(24rem,calc(100%-2rem))] p-6
surface-overlay m-auto rounded-lg border border-surface-border shadow-xl backdrop:bg-black/50 w-[min(24rem,calc(100%-2rem))] p-6
'dialog.confirm': {
kind: 'semantic',
description: 'Asks the user to confirm or cancel one decision, with at most one field: type the project name to delete it',
refs: ['surface.overlay'],
binding: { classes: 'w-[min(24rem,calc(100%-2rem))] p-6' },
notFor: [
{
context: 'a form or anything with several steps',
instead: 'dialog.task',
},
],
},