TitleDiv 컴포넌트 리팩토링

This commit is contained in:
static
2025-01-27 19:33:38 +09:00
parent cf51f2618e
commit df9831da8e
12 changed files with 142 additions and 101 deletions

View File

@@ -0,0 +1,24 @@
<script lang="ts">
import type { Component, Snippet } from "svelte";
import type { ClassValue, SvelteHTMLElements } from "svelte/elements";
interface Props {
children?: Snippet;
class?: ClassValue;
icon?: Component<SvelteHTMLElements["svg"]>;
textClass?: ClassValue;
}
let { children, icon: Icon, ...props }: Props = $props();
</script>
<div class={props.class}>
<div class="flex min-h-[10vh] items-center">
{#if Icon}
<Icon class="text-5xl text-gray-600" />
{/if}
</div>
<p class={["text-3xl font-bold", props.textClass]}>
{@render children?.()}
</p>
</div>