mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 09:20:36 +01:00
feat(CheckboxGroup): new component (#3862)
Co-authored-by: Benjamin Canac <canacb1@gmail.com> Co-authored-by: Romain Hamel <rom.hml@gmail.com>
This commit is contained in:
47
src/theme/checkbox-group.ts
Normal file
47
src/theme/checkbox-group.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
export default {
|
||||
slots: {
|
||||
root: 'relative',
|
||||
fieldset: 'flex gap-x-2',
|
||||
legend: 'mb-1 block font-medium text-default'
|
||||
},
|
||||
variants: {
|
||||
orientation: {
|
||||
horizontal: {
|
||||
fieldset: 'flex-row'
|
||||
},
|
||||
vertical: {
|
||||
fieldset: 'flex-col'
|
||||
}
|
||||
},
|
||||
size: {
|
||||
xs: {
|
||||
fieldset: 'gap-y-0.5',
|
||||
legend: 'text-xs'
|
||||
},
|
||||
sm: {
|
||||
fieldset: 'gap-y-0.5',
|
||||
legend: 'text-xs'
|
||||
},
|
||||
md: {
|
||||
fieldset: 'gap-y-1',
|
||||
legend: 'text-sm'
|
||||
},
|
||||
lg: {
|
||||
fieldset: 'gap-y-1',
|
||||
legend: 'text-sm'
|
||||
},
|
||||
xl: {
|
||||
fieldset: 'gap-y-1.5',
|
||||
legend: 'text-base'
|
||||
}
|
||||
},
|
||||
required: {
|
||||
true: {
|
||||
legend: 'after:content-[\'*\'] after:ms-0.5 after:text-error'
|
||||
}
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
size: 'md'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user