mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
Add Field component system and migrate UI
This commit is contained in:
25
resources/js/packages/ui/src/field/FieldLegend.vue
Normal file
25
resources/js/packages/ui/src/field/FieldLegend.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
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>
|
||||
Reference in New Issue
Block a user