Files
pocket-id/frontend/src/lib/components/ui/card/card-title.svelte

22 lines
555 B
Svelte
Raw Normal View History

2024-08-12 11:00:25 +02:00
<script lang="ts">
2025-01-19 15:41:16 +01:00
import type { HTMLAttributes } from 'svelte/elements';
import type { HeadingLevel } from './index.js';
import { cn } from '$lib/utils/style.js';
2024-08-12 11:00:25 +02:00
type $$Props = HTMLAttributes<HTMLHeadingElement> & {
tag?: HeadingLevel;
};
2025-01-19 15:41:16 +01:00
let className: $$Props['class'] = undefined;
export let tag: $$Props['tag'] = 'h3';
2024-08-12 11:00:25 +02:00
export { className as class };
</script>
<svelte:element
this={tag}
class={cn('flex items-center gap-2 text-xl font-semibold leading-none tracking-tight', className)}
2024-08-12 11:00:25 +02:00
{...$$restProps}
>
<slot />
</svelte:element>