Custom Dialog
Dialog with title, content and action slots wired for forms.
Installation
bun add @xerobi/ui
import { ConfirmDialog } from "@xerobi/ui/custom-dialog"This component is client-side. In Astro, hydrate it with a client directive.
API reference
ConfirmDialog
| Prop | Type | Description |
|---|---|---|
| open* | boolean | |
| onClose* | () => void | |
| title* | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| action* | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | Primary action, usually a `<Button color="error">`. Rendered before Cancel. |
| content | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| cancelLabel | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> |