From 98ab6c63d5ed5b60cfe2cd001e35376fd723c063 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 18 May 2026 21:43:08 +0200 Subject: [PATCH] Fix missing CheckBoxInput labels --- src/base/components/inputs/CheckboxInput.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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} /> );