25 lines
589 B
Vue
25 lines
589 B
Vue
<script setup lang="ts">
|
|
import { cn } from '~/lib/utils';
|
|
|
|
const props = defineProps<{
|
|
label: string
|
|
class?: string
|
|
labelClass?: string
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<div :class="cn(`flex flex-col gap-1 lg:grid lg:grid-cols-[180px_minmax(0,1fr)] lg:gap-x-3`, props.class)">
|
|
<!-- Label -->
|
|
<span :class="cn(`text-md font-normal text-muted-foreground`, props.labelClass)">
|
|
{{ label }}
|
|
</span>
|
|
|
|
<!-- Value -->
|
|
<span class="truncate lg:whitespace-normal">
|
|
<span class="me-3 hidden lg:inline-block">:</span>
|
|
<slot />
|
|
</span>
|
|
</div>
|
|
</template>
|