diff --git a/front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx b/front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx new file mode 100644 index 000000000..e01117548 --- /dev/null +++ b/front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx @@ -0,0 +1,64 @@ +import styled from '@emotion/styled'; + +import { H2Title } from '@/ui/display/typography/components/H2Title'; +import { IconPicker } from '@/ui/input/components/IconPicker'; +import { TextArea } from '@/ui/input/components/TextArea'; +import { TextInput } from '@/ui/input/components/TextInput'; +import { Section } from '@/ui/layout/section/components/Section'; + +type SettingsObjectFieldFormSectionProps = { + disabled?: boolean; + name?: string; + description?: string; + iconKey?: string; + onChange?: ( + formValues: Partial<{ + iconKey: string; + name: string; + description: string; + }>, + ) => void; +}; + +const StyledInputsContainer = styled.div` + display: flex; + gap: ${({ theme }) => theme.spacing(2)}; + margin-bottom: ${({ theme }) => theme.spacing(2)}; + width: 100%; +`; + +export const SettingsObjectFieldFormSection = ({ + disabled, + name = '', + description = '', + iconKey = 'IconUsers', + onChange, +}: SettingsObjectFieldFormSectionProps) => ( +
+ + + onChange?.({ iconKey: value.iconKey })} + variant="primary" + /> + onChange?.({ name: value })} + disabled={disabled} + fullWidth + /> + +