mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 10:42:16 +01:00
26 lines
571 B
Vue
26 lines
571 B
Vue
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue';
|
|
import { cn } from '../utils/cn';
|
|
|
|
const props = defineProps<{
|
|
class?: HTMLAttributes['class'];
|
|
variant?: 'legend' | 'label';
|
|
}>();
|
|
</script>
|
|
|
|
<template>
|
|
<legend
|
|
data-slot="field-legend"
|
|
:data-variant="variant"
|
|
:class="
|
|
cn(
|
|
'mb-3 font-medium',
|
|
'data-[variant=legend]:text-base',
|
|
'data-[variant=label]:text-sm',
|
|
props.class
|
|
)
|
|
">
|
|
<slot />
|
|
</legend>
|
|
</template>
|