DialogScope
Opens a dialog's flow fresh every time: the first step, empty fields, no earlier result or secret. The content stays as it was while the dialog closes.
function CreateKey() {
const [open, setOpen] = useState(false);
return (
<>
<Button variant="primary" onClick={() => setOpen(true)}>
Create key
</Button>
<DialogScope open={open}>
<CreateKeyFlow open={open} onClose={() => setOpen(false)} />
</DialogScope>
</>
);
}import { DialogScope } from "@logicplanes/kaeso-ui";Props
childrenReactNodeThe component that keeps the flow's state and renders the dialog with the same
open.openbooleanWhether the dialog inside is open; pass the value its
opengets.