diff --git a/changelog.txt b/changelog.txt index 937ffd49..147739b2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,4 @@ - Version 1.4.2 - xxth February, 2025 -- Improvement - Adjusted the font size of the help text in the Switch and Checkbox component. - Improvement - Adjusted the ring width of the Radio Button component. Version 1.4.1 - 10th February, 2025 diff --git a/src/components/checkbox/checkbox.tsx b/src/components/checkbox/checkbox.tsx index aa81ce1a..07e7dada 100644 --- a/src/components/checkbox/checkbox.tsx +++ b/src/components/checkbox/checkbox.tsx @@ -60,19 +60,17 @@ export const CheckboxComponent = ( checkbox: 'size-4 rounded gap-1', icon: 'size-3', text: 'text-sm', // text class for sm + description: 'text-sm', gap: 'gap-0.5', }, md: { checkbox: 'size-5 rounded gap-1', icon: 'size-4', text: 'text-base', // text class for md + description: 'text-sm', gap: 'gap-1', }, }; - const descriptionSize = { - sm: 'xs', - md: 'sm', - }; const colorClassNames = { primary: { checkbox: @@ -136,9 +134,9 @@ export const CheckboxComponent = ( tag="p" className={ cn( 'font-normal leading-5 m-0', + sizeClassNames[ size ].description, disabled && 'text-text-disabled' ) } - size={ descriptionSize[ size ] as 'xs' | 'sm' } variant="help" > { label?.description } diff --git a/src/components/switch/switch.tsx b/src/components/switch/switch.tsx index 87394ba4..bc0df3ed 100644 --- a/src/components/switch/switch.tsx +++ b/src/components/switch/switch.tsx @@ -65,10 +65,9 @@ export const SwitchLabel = ( { sm: 'text-sm leading-5 font-medium', md: 'text-base leading-6 font-medium', }; - const descriptionSize = { - sm: 'xs', - md: 'sm', - lg: 'sm', + const descriptionClasses = { + sm: 'text-sm leading-5 font-normal', + md: 'text-sm leading-5 font-normal', }; const gapClassNames = { sm: 'space-y-0.5', @@ -102,8 +101,10 @@ export const SwitchLabel = ( {