feat(Former): update layout to use buttonArea prop instead of buttonOnTop

This commit is contained in:
2026-01-28 20:07:30 +02:00
parent ad2252f5e4
commit ce7cf9435a
4 changed files with 14 additions and 12 deletions

View File

@@ -35,8 +35,8 @@ export const FormTest = () => {
url: '',
});
const [layout, setLayout] = useState({
buttonArea: "bottom",
buttonAreaGroupProps: { justify: 'center' },
buttonOnTop: false,
title: 'Custom Former Title',
} as FormerProps['layout']);
@@ -63,11 +63,13 @@ export const FormTest = () => {
label="Disable HTML Form"
onChange={(event) => setDisableHTML(event.currentTarget.checked)}
/>
<Switch
checked={layout?.buttonOnTop ?? false}
label="Button On Top"
onChange={(event) => setLayout({ ...layout, buttonOnTop: event.currentTarget.checked })}
<Select
data={['top', 'bottom', 'none']}
onChange={(value) => setLayout({ ...layout, buttonArea: value as 'bottom' | 'none' | 'top' })}
value={layout?.buttonArea}
/>
<Switch
checked={apiOptions.type === 'api'}
label="Use API"