forked from BRETT/BRETT
Initial Commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from 'vue'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
class?: HTMLAttributes['class']
|
||||
variant?: 'legend' | 'label'
|
||||
}>(), {
|
||||
variant: 'legend',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<legend
|
||||
data-slot="field-legend"
|
||||
:data-variant="variant"
|
||||
:class="cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', props.class)"
|
||||
>
|
||||
<slot />
|
||||
</legend>
|
||||
</template>
|
||||
Reference in New Issue
Block a user