feat(ButtonGroup): new component (#88)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Romain Hamel
2024-05-07 11:19:25 +02:00
committed by GitHub
parent 2c5d7ccf70
commit 43066fd9ea
12 changed files with 317 additions and 10 deletions

32
src/theme/button-group.ts Normal file
View File

@@ -0,0 +1,32 @@
export const buttonGroupVariant = {
buttonGroup: {
horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none',
vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none'
}
}
export const buttonGroupVariantWithRoot = {
buttonGroup: {
horizontal: {
root: 'group',
base: 'group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none'
},
vertical: {
root: 'group',
base: 'group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none'
}
}
}
export default {
slots: {
base: 'relative'
},
variants: {
orientation: {
horizontal: 'inline-flex -space-x-px',
vertical: 'flex flex-col -space-y-px'
}
}
}