IconEntryButton 컴포넌트 추가

This commit is contained in:
static
2025-01-26 22:04:53 +09:00
parent c709a79266
commit 32ecf46341
13 changed files with 186 additions and 93 deletions

View File

@@ -0,0 +1,23 @@
<script lang="ts">
import type { Component, Snippet } from "svelte";
import type { ClassValue, SvelteHTMLElements } from "svelte/elements";
import { EntryButton } from "$lib/components/atoms";
import { IconLabel } from "$lib/components/molecules";
interface Props {
children?: Snippet;
class?: ClassValue;
icon: Component<SvelteHTMLElements["svg"]>;
iconClass?: ClassValue;
onclick?: () => void;
textClass?: ClassValue;
}
let { children, icon, onclick, ...props }: Props = $props();
</script>
<EntryButton {onclick} class={props.class}>
<IconLabel {icon} class="h-full" iconClass={props.iconClass} textClass={props.textClass}>
{@render children?.()}
</IconLabel>
</EntryButton>