FormActions
A standard form action bar that renders Submit and Cancel buttons with consistent spacing and loading state. Place it at the bottom of a form.
π StorybookPreviewβ
Live previewβ Open in Storybook
Importβ
import { FormActions } from "@xocialive/ui-components";
Basic usageβ
<FormActions onSubmit={formik.handleSubmit} onCancel={() => navigate(-1)} isSubmitting={formik.isSubmitting} />
Propsβ
| Prop | Type | Default | Description |
|---|---|---|---|
onSubmit | () => void | β | Submit button handler |
onCancel | () => void | β | Cancel button handler |
isSubmitting | boolean | false | Shows a spinner and disables submit |
submitLabel | string | "Save" | Submit button label |
cancelLabel | string | "Cancel" | Cancel button label |
sx | SxProps<Theme> | β | Root element style overrides |