You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
702 B
32 lines
702 B
<script setup lang="ts">
|
|
import { type HTMLAttributes, computed } from 'vue'
|
|
import { SeparatorRoot, type SeparatorRootProps } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const props = withDefaults(
|
|
defineProps<SeparatorRootProps & { class?: HTMLAttributes['class'] }>(),
|
|
{
|
|
orientation: 'horizontal',
|
|
decorative: true,
|
|
}
|
|
)
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props
|
|
|
|
return delegated
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<SeparatorRoot
|
|
v-bind="delegatedProps"
|
|
:class="
|
|
cn(
|
|
'shrink-0 bg-border',
|
|
props.orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
|
|
props.class
|
|
)
|
|
"
|
|
/>
|
|
</template>
|
|
|