레이아웃에 필수적인 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

@@ -8,7 +8,7 @@
interface Props {
cancelText?: string;
children?: Snippet;
children: Snippet;
confirmText: string;
isOpen: boolean;
onbeforeclose?: () => void;
@@ -41,7 +41,7 @@
<Modal bind:isOpen onclose={closeModal} class="space-y-4">
<div class="flex flex-col gap-y-2 break-keep">
<p class="text-xl font-bold">{title}</p>
{@render children?.()}
{@render children()}
</div>
<div class="flex gap-x-2">
<Button color="gray" onclick={closeModal} class="flex-1">{cancelText}</Button>