Files
BetiX/resources/js/components/Heading.vue
Dolo 0280278978
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled
Initialer Laravel Commit für BetiX
2026-04-04 18:01:50 +02:00

25 lines
594 B
Vue

<script setup lang="ts">
import { computed } from 'vue';
const props = withDefaults(defineProps<{
title: string;
description?: string;
variant?: 'default' | 'small';
}>(), {
variant: 'default',
});
const headingTag = computed(() => props.variant === 'small' ? 'h3' : 'h2');
</script>
<template>
<div class="space-y-1">
<component :is="headingTag" class="font-semibold text-2xl" :class="{ 'text-xl': variant === 'small' }">
{{ title }}
</component>
<p v-if="description" class="text-muted-foreground text-sm">
{{ description }}
</p>
</div>
</template>