mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-04 00:32:26 +08:00
33 lines
676 B
Vue
33 lines
676 B
Vue
|
|
<script setup lang="ts">
|
||
|
|
import { Separator as SeparatorPrimitive } from 'radix-vue'
|
||
|
|
import { cn } from '@/lib/utils'
|
||
|
|
import { computed } from 'vue'
|
||
|
|
|
||
|
|
interface Props {
|
||
|
|
class?: string
|
||
|
|
orientation?: 'horizontal' | 'vertical'
|
||
|
|
decorative?: boolean
|
||
|
|
}
|
||
|
|
|
||
|
|
const props = withDefaults(defineProps<Props>(), {
|
||
|
|
orientation: 'horizontal',
|
||
|
|
decorative: true,
|
||
|
|
})
|
||
|
|
|
||
|
|
const separatorClass = computed(() =>
|
||
|
|
cn(
|
||
|
|
'shrink-0 bg-border',
|
||
|
|
props.orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
|
||
|
|
props.class
|
||
|
|
)
|
||
|
|
)
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<template>
|
||
|
|
<SeparatorPrimitive
|
||
|
|
:class="separatorClass"
|
||
|
|
:orientation="orientation"
|
||
|
|
:decorative="decorative"
|
||
|
|
/>
|
||
|
|
</template>
|