PromptDialog
API reference and demos for PromptDialog.
Import
Section titled “Import”import { PromptDialog } from "@flanksource/clicky-ui/data";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
basePath* |
string |
— | Base path the prompt API is mounted under, e.g. "/api/todos". |
lookupFetcher |
LookupFetcher |
— | Resolves the options of the schema's `x-clicky-lookup` fields (e.g. a connection picker). |
onClose* |
(…) => void |
— | Closes the modal without answering (the prompt stays pending). |
onResolved |
(…) => … |
— | Called after the prompt is successfully answered or cancelled. |
open* |
boolean |
— | — |
prompt* |
PromptSnapshot |
— | The pending prompt to answer. Its `schema` drives the rendered form. |
size |
enum |
lg |
The dialog width; a form of several fields needs more than a confirm box. |