diff --git a/src/base/components/inputs/CheckboxInput.tsx b/src/base/components/inputs/CheckboxInput.tsx index 2c148741..1690f448 100644 --- a/src/base/components/inputs/CheckboxInput.tsx +++ b/src/base/components/inputs/CheckboxInput.tsx @@ -23,13 +23,19 @@ type PrimaryTextProps = { type Props = BaseProps & ((LabelProps & PropertiesNever) | (PropertiesNever & PrimaryTextProps)); -export const CheckboxInput = ({ primaryText, secondaryText, sx, ...rest }: Props) => ( +export const CheckboxInput = ({ label, primaryText, secondaryText, sx, ...rest }: Props) => ( } - label={ - primaryText && !secondaryText ? ( - primaryText - ) : ( + label={(() => { + if (label) { + return label; + } + + if (primaryText && !secondaryText) { + return primaryText; + } + + return ( - ) - } + ); + })()} sx={sx} /> );