feat(Checkbox): new component (#67)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Romain Hamel
2024-03-27 12:00:15 +01:00
committed by GitHub
parent 8fd369372b
commit bfd5988358
34 changed files with 718 additions and 303 deletions

View File

@@ -10,10 +10,15 @@ export default (config: { colors: string[] }) => ({
icon: `group-data-[state=checked]:text-${color}-500 dark:group-data-[state=checked]:text-${color}-400`
}])),
size: {
'2xs': {
root: 'h-3 w-5',
thumb: 'size-2 data-[state=checked]:translate-x-2',
icon: 'size-1'
},
xs: {
root: 'h-4 w-7',
thumb: 'size-3 data-[state=checked]:translate-x-3',
icon: 'size-2.5'
icon: 'size-2'
},
sm: {
root: 'h-5 w-9',
@@ -26,9 +31,14 @@ export default (config: { colors: string[] }) => ({
icon: 'size-4'
},
lg: {
root: 'h-7 w-[3.25rem]',
root: 'h-7 w-[52px]',
thumb: 'size-6 data-[state=checked]:translate-x-6',
icon: 'size-5'
},
xl: {
root: 'h-8 w-[60px]',
thumb: 'size-7 data-[state=checked]:translate-x-7',
icon: 'size-6'
}
},
checked: {