mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
feat(ButtonGroup): new component (#88)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
32
src/theme/button-group.ts
Normal file
32
src/theme/button-group.ts
Normal 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'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user