diff --git a/src/components/form-slice/FormItemPlugins/PluginEditorDrawer.tsx b/src/components/form-slice/FormItemPlugins/PluginEditorDrawer.tsx index 8a72b81224..16efd859e8 100644 --- a/src/components/form-slice/FormItemPlugins/PluginEditorDrawer.tsx +++ b/src/components/form-slice/FormItemPlugins/PluginEditorDrawer.tsx @@ -64,41 +64,43 @@ export const PluginEditorDrawer = (props: PluginEditorDrawerProps) => { closeOnEscape={false} opened={opened} onClose={handleClose} - styles={{ body: { paddingTop: '18px' } }} + classNames={{ + body: 'plugin-editor-drawer__body', + }} {...(mode === 'add' && { title: t('form.plugins.addPlugin') })} {...(mode === 'edit' && { title: t('form.plugins.editPlugin') })} {...(mode === 'view' && { title: t('form.plugins.viewPlugin') })} > - - {name} - - -
- - +
+ {name} + +
+ + - {mode !== 'view' && ( - - { - onSave({ name, config: JSON.parse(config) }); - handleClose(); - })} - > - {mode === 'add' && t('form.btn.add')} - {mode === 'edit' && t('form.btn.save')} - - - )} -
+ {mode !== 'view' && ( + + { + onSave({ name, config: JSON.parse(config) }); + handleClose(); + })} + > + {mode === 'add' && t('form.btn.add')} + {mode === 'edit' && t('form.btn.save')} + + + )} + +
); }; diff --git a/src/styles/global.css b/src/styles/global.css index 2e63b257ef..340225ca59 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -50,3 +50,30 @@ color: var(--mantine-color-gray-5) !important; } } + +.plugin-editor-drawer__body { + padding-top: 18px; + max-height: calc(100vh - 80px); + overflow-y: auto; +} + +.plugin-editor-drawer__content { + min-height: 0; + display: flex; + flex-direction: column; + gap: var(--mantine-spacing-xs); +} + +.plugin-editor-drawer__form { + min-height: 0; +} + +.plugin-editor-drawer__actions { + position: sticky; + bottom: 0; + margin-top: var(--mantine-spacing-xs); + padding-top: var(--mantine-spacing-xs); + background: var(--mantine-color-body); + border-top: 1px solid var(--mantine-color-gray-2); + z-index: 2; +} \ No newline at end of file