레이아웃에 필수적인 Snippet은 반드시 전달해야하도록 Props 타입 수정

This commit is contained in:
static
2025-01-28 22:41:35 +09:00
parent acb6e1ac6e
commit b6edc2a8bc
17 changed files with 35 additions and 39 deletions

View File

@@ -5,7 +5,7 @@
import IconChevronRight from "~icons/material-symbols/chevron-right";
interface Props {
children?: Snippet;
children: Snippet;
class?: ClassValue;
onclick?: () => void;
}
@@ -17,12 +17,10 @@
onclick={onclick && (() => setTimeout(onclick, 100))}
class={["rounded-xl active:bg-gray-100", className]}
>
<div class="flex h-full gap-x-4 p-2 transition active:scale-95">
<div class="h-full flex-grow">
{@render children?.()}
</div>
<div class="flex flex-shrink-0 items-center">
<IconChevronRight class="text-xl text-gray-800" />
<div class="flex h-full items-center gap-x-4 p-2 transition active:scale-95">
<div class="flex-grow">
{@render children()}
</div>
<IconChevronRight class="flex-shrink-0 text-xl text-gray-800" />
</div>
</button>