Files
simrsx-fe/app/components/pub/my-ui/form/view/detail-row.vue
T
2025-11-25 14:39:41 +07:00

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>