Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 3 additions & 5 deletions src/components/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }
Expand Down
13 changes: 7 additions & 6 deletions src/components/switch/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -102,8 +101,10 @@ export const SwitchLabel = ( {
<Label
tag="p"
variant="help"
className="m-0"
size={ descriptionSize[ size ] as 'xs' | 'sm' }
className={ cn(
'text-sm font-normal leading-5 m-0',
descriptionClasses[ size ]
) }
{ ...( disabled && { variant: 'disabled' } ) }
>
{ description }
Expand Down