Added ButtonGroup component

This commit is contained in:
2025-11-04 13:47:37 +01:00
parent 985393b720
commit 52d51fde63
6 changed files with 110 additions and 9 deletions
@@ -1,17 +1,18 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { reactiveOmit } from '@vueuse/core'
import { Separator, type SeparatorProps } from 'reka-ui'
import type { SeparatorProps } from "reka-ui"
import type { HTMLAttributes } from "vue"
import { reactiveOmit } from "@vueuse/core"
import { Separator } from "reka-ui"
import { cn } from "@/lib/utils"
const props = withDefaults(defineProps<
SeparatorProps & { class?: HTMLAttributes['class'] }
SeparatorProps & { class?: HTMLAttributes["class"] }
>(), {
orientation: 'horizontal',
orientation: "horizontal",
decorative: true,
})
const delegatedProps = reactiveOmit(props, 'class')
const delegatedProps = reactiveOmit(props, "class")
</script>
<template>
@@ -20,7 +21,7 @@ const delegatedProps = reactiveOmit(props, 'class')
v-bind="delegatedProps"
:class="
cn(
`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,
'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
props.class,
)
"
@@ -1 +1 @@
export { default as Separator } from './Separator.vue'
export { default as Separator } from "./Separator.vue"