diff --git a/packages/lib-components/src/components/inputs/InputProps.ts b/packages/lib-components/src/components/inputs/InputProps.ts index 55f4c6718e..488a97f17c 100644 --- a/packages/lib-components/src/components/inputs/InputProps.ts +++ b/packages/lib-components/src/components/inputs/InputProps.ts @@ -42,7 +42,6 @@ interface DefaultInputProps { readOnly?: boolean; disabled?: boolean; size?: Size; - hasMargin?: boolean; } type Required = { @@ -53,7 +52,6 @@ export const defaultInputProps: Required = { readOnly: false, disabled: false, size: 'medium', - hasMargin: true, }; export function defaultInputPropsFactory(defaultValues: Required) { diff --git a/packages/lib-components/src/components/inputs/RadioGroup/Controlled.tsx b/packages/lib-components/src/components/inputs/RadioGroup/Controlled.tsx index d4ae4abd9f..4d599e0757 100644 --- a/packages/lib-components/src/components/inputs/RadioGroup/Controlled.tsx +++ b/packages/lib-components/src/components/inputs/RadioGroup/Controlled.tsx @@ -12,7 +12,7 @@ export type ControlledRadioGroupProps = PropsWithChildren; const defaultsApplier = defaultInputPropsFactory(defaultInputProps); export const ControlledRadioGroup: FC & RadioGroupSubComponents = (props) => { - const { name, control, description, children, disabled, readOnly, required, hasMargin } = defaultsApplier(props); + const { name, control, description, children, disabled, readOnly, required } = defaultsApplier(props); const { field, @@ -32,7 +32,6 @@ export const ControlledRadioGroup: FC & RadioGroupSub hasError={!!error} required={required} hasDescription={!!description} - hasMargin={hasMargin} > {children} diff --git a/packages/lib-components/src/components/inputs/layout/InputWrapper.ts b/packages/lib-components/src/components/inputs/layout/InputWrapper.ts index c367cd8162..e54d6d69b8 100644 --- a/packages/lib-components/src/components/inputs/layout/InputWrapper.ts +++ b/packages/lib-components/src/components/inputs/layout/InputWrapper.ts @@ -1,6 +1,6 @@ import { styled } from '../../../styled'; -export const InputWrapper = styled.div<{ marginBottom?: string }>` +export const InputWrapper = styled.div` width: 100%; - margin-bottom: ${({ theme, marginBottom }) => (marginBottom ? marginBottom : theme.spacing[2])}; + margin-bottom: ${({ theme }) => theme.spacing[2]}; `; diff --git a/packages/lib-components/src/components/inputs/selects/SelectField/Controlled.tsx b/packages/lib-components/src/components/inputs/selects/SelectField/Controlled.tsx index f321323fdb..b7d41e0cc7 100644 --- a/packages/lib-components/src/components/inputs/selects/SelectField/Controlled.tsx +++ b/packages/lib-components/src/components/inputs/selects/SelectField/Controlled.tsx @@ -32,7 +32,6 @@ export const ControlledSelectField: FC & SubComponen enableFilter, inPortal, canClear, - hasMargin = true, } = defaultsApplier(props); const { @@ -81,7 +80,7 @@ export const ControlledSelectField: FC & SubComponen } return ( - + {label && (