@brickslab./ui-webQuiz
Sticky submission bar with save-draft, submit, and reset actions and loading states.
Submit only
With Save draft and Reset
Error state
Props
| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
onSubmit | () => Promise<void> | — | ✓ | Async callback for form submission. |
onSaveDraft | () => Promise<void> | — | — | Shows a Save draft button when provided. |
onReset | () => void | — | — | Shows a Reset button when provided. |
state | "idle" | "saving" | "submitting" | "success" | "error" | "idle" | — | Controls loading and feedback display. |
error | string | — | — | Error message shown when state is «error». |
Override rapide
Tous les paramètres listés dans cette table sont overrideables via les props. Utilisez ce squelette comme point de départ.
<MyComponent
onSubmit={...}
onSaveDraft={...}
onReset={...}
state="idle"
error="..."
/>onSubmitonSaveDraftonResetstateerror