mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-14 22:08:45 +00:00
레이아웃에 필수적인 Snippet은 반드시 전달해야하도록 Props 타입 수정
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
import { AdaptiveDiv } from "$lib/components/atoms";
|
import { AdaptiveDiv } from "$lib/components/atoms";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onclose?: () => void;
|
onclose?: () => void;
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
transition:fly|global={{ y: 100, duration: 200 }}
|
transition:fly|global={{ y: 100, duration: 200 }}
|
||||||
>
|
>
|
||||||
<div class={["flex-grow overflow-y-auto", className]}>
|
<div class={["flex-grow overflow-y-auto", className]}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AdaptiveDiv>
|
</AdaptiveDiv>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import { AdaptiveDiv } from "$lib/components/atoms";
|
import { AdaptiveDiv } from "$lib/components/atoms";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onclose?: () => void;
|
onclose?: () => void;
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<AdaptiveDiv class="h-full">
|
<AdaptiveDiv class="h-full">
|
||||||
<div class="flex h-full items-center justify-center px-4">
|
<div class="flex h-full items-center justify-center px-4">
|
||||||
<div onclick={(e) => e.stopPropagation()} class={["rounded-2xl bg-white p-4", className]}>
|
<div onclick={(e) => e.stopPropagation()} class={["rounded-2xl bg-white p-4", className]}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AdaptiveDiv>
|
</AdaptiveDiv>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
interface Props {
|
interface Props {
|
||||||
actionButtonClass?: ClassValue;
|
actionButtonClass?: ClassValue;
|
||||||
actionButtonIcon?: Component<SvelteHTMLElements["svg"]>;
|
actionButtonIcon?: Component<SvelteHTMLElements["svg"]>;
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
onActionButtonClick?: () => void;
|
onActionButtonClick?: () => void;
|
||||||
onclick?: () => void;
|
onclick?: () => void;
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
onclick={onclick && (() => setTimeout(onclick, 100))}
|
onclick={onclick && (() => setTimeout(onclick, 100))}
|
||||||
class={["rounded-xl", className]}
|
class={["rounded-xl", className]}
|
||||||
>
|
>
|
||||||
<div id="children" class="flex h-full items-center justify-between gap-x-4 p-2 transition">
|
<div id="children" class="flex h-full items-center gap-x-4 p-2 transition">
|
||||||
<div class="flex-grow overflow-x-hidden">
|
<div class="flex-grow overflow-x-hidden">
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
{#if ActionButtonIcon}
|
{#if ActionButtonIcon}
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import type { ClassValue } from "svelte/elements";
|
import type { ClassValue } from "svelte/elements";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
color?: "primary" | "gray";
|
color?: "primary" | "gray";
|
||||||
onclick?: () => void;
|
onclick?: () => void;
|
||||||
@@ -34,5 +34,5 @@
|
|||||||
className,
|
className,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import IconChevronRight from "~icons/material-symbols/chevron-right";
|
import IconChevronRight from "~icons/material-symbols/chevron-right";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
onclick?: () => void;
|
onclick?: () => void;
|
||||||
}
|
}
|
||||||
@@ -17,12 +17,10 @@
|
|||||||
onclick={onclick && (() => setTimeout(onclick, 100))}
|
onclick={onclick && (() => setTimeout(onclick, 100))}
|
||||||
class={["rounded-xl active:bg-gray-100", className]}
|
class={["rounded-xl active:bg-gray-100", className]}
|
||||||
>
|
>
|
||||||
<div class="flex h-full gap-x-4 p-2 transition active:scale-95">
|
<div class="flex h-full items-center gap-x-4 p-2 transition active:scale-95">
|
||||||
<div class="h-full flex-grow">
|
<div class="flex-grow">
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
|
||||||
<div class="flex flex-shrink-0 items-center">
|
|
||||||
<IconChevronRight class="text-xl text-gray-800" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<IconChevronRight class="flex-shrink-0 text-xl text-gray-800" />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import type { Snippet } from "svelte";
|
import type { Snippet } from "svelte";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
onclick?: () => void;
|
onclick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,6 +14,6 @@
|
|||||||
class="text-sm font-medium text-gray-800 underline underline-offset-2 active:rounded-xl active:bg-gray-100"
|
class="text-sm font-medium text-gray-800 underline underline-offset-2 active:rounded-xl active:bg-gray-100"
|
||||||
>
|
>
|
||||||
<div class="h-full p-1 transition active:scale-95">
|
<div class="h-full p-1 transition active:scale-95">
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import type { ClassValue } from "svelte/elements";
|
import type { ClassValue } from "svelte/elements";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,5 +11,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={["mx-auto max-w-screen-md", className]}>
|
<div class={["mx-auto max-w-screen-md", className]}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import type { ClassValue } from "svelte/elements";
|
import type { ClassValue } from "svelte/elements";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,5 +11,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={["sticky bottom-0 bg-white pb-4", className]}>
|
<div class={["sticky bottom-0 bg-white pb-4", className]}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-grow flex-col justify-between px-4">
|
<div class="flex flex-grow flex-col justify-between px-4">
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
checked?: boolean;
|
checked?: boolean;
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { checked = $bindable(false), children }: Props = $props();
|
let { checked = $bindable(false), children }: Props = $props();
|
||||||
@@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
<label class="flex items-center gap-x-1">
|
<label class="flex items-center gap-x-1">
|
||||||
<input bind:checked type="checkbox" class="hidden" />
|
<input bind:checked type="checkbox" class="hidden" />
|
||||||
<div>
|
{@render children()}
|
||||||
{@render children?.()}
|
|
||||||
</div>
|
|
||||||
{#if checked}
|
{#if checked}
|
||||||
<IconCheckCircle class="text-primary-600" />
|
<IconCheckCircle class="text-primary-600" />
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
cancelText?: string;
|
cancelText?: string;
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
confirmText: string;
|
confirmText: string;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onbeforeclose?: () => void;
|
onbeforeclose?: () => void;
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<Modal bind:isOpen onclose={closeModal} class="space-y-4">
|
<Modal bind:isOpen onclose={closeModal} class="space-y-4">
|
||||||
<div class="flex flex-col gap-y-2 break-keep">
|
<div class="flex flex-col gap-y-2 break-keep">
|
||||||
<p class="text-xl font-bold">{title}</p>
|
<p class="text-xl font-bold">{title}</p>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-x-2">
|
<div class="flex gap-x-2">
|
||||||
<Button color="gray" onclick={closeModal} class="flex-1">{cancelText}</Button>
|
<Button color="gray" onclick={closeModal} class="flex-1">{cancelText}</Button>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import { IconLabel } from "$lib/components/molecules";
|
import { IconLabel } from "$lib/components/molecules";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
icon: Component<SvelteHTMLElements["svg"]>;
|
icon: Component<SvelteHTMLElements["svg"]>;
|
||||||
iconClass?: ClassValue;
|
iconClass?: ClassValue;
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
|
|
||||||
<EntryButton {onclick} class={className}>
|
<EntryButton {onclick} class={className}>
|
||||||
<IconLabel {icon} class="h-full" iconClass={iconClassName} textClass={textClassName}>
|
<IconLabel {icon} class="h-full" iconClass={iconClassName} textClass={textClassName}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</IconLabel>
|
</IconLabel>
|
||||||
</EntryButton>
|
</EntryButton>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
description?: Snippet;
|
description?: Snippet;
|
||||||
icon?: Component<SvelteHTMLElements["svg"]>;
|
icon?: Component<SvelteHTMLElements["svg"]>;
|
||||||
title?: Snippet;
|
title: Snippet;
|
||||||
titleClass?: ClassValue;
|
titleClass?: ClassValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<div class={["space-y-4 py-4", className]}>
|
<div class={["space-y-4 py-4", className]}>
|
||||||
<div class="space-y-2 break-keep">
|
<div class="space-y-2 break-keep">
|
||||||
<TitleLabel {icon} textClass={titleClassName}>
|
<TitleLabel {icon} textClass={titleClassName}>
|
||||||
{@render title?.()}
|
{@render title()}
|
||||||
</TitleLabel>
|
</TitleLabel>
|
||||||
{#if description}
|
{#if description}
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<div class="w-[2.3rem] flex-shrink-0">
|
<div class="w-[2.3rem] flex-shrink-0">
|
||||||
{#if children}
|
{#if children}
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import type { ClassValue, SvelteHTMLElements } from "svelte/elements";
|
import type { ClassValue, SvelteHTMLElements } from "svelte/elements";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
icon: Component<SvelteHTMLElements["svg"]>;
|
icon: Component<SvelteHTMLElements["svg"]>;
|
||||||
iconClass?: ClassValue;
|
iconClass?: ClassValue;
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-grow flex-col overflow-x-hidden text-left">
|
<div class="flex flex-grow flex-col overflow-x-hidden text-left">
|
||||||
<p class={["truncate font-medium", textClassName]}>
|
<p class={["truncate font-medium", textClassName]}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</p>
|
</p>
|
||||||
{#if subtext}
|
{#if subtext}
|
||||||
<p class="truncate text-xs text-gray-800">
|
<p class="truncate text-xs text-gray-800">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import type { ClassValue, SvelteHTMLElements } from "svelte/elements";
|
import type { ClassValue, SvelteHTMLElements } from "svelte/elements";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: Snippet;
|
children: Snippet;
|
||||||
class?: ClassValue;
|
class?: ClassValue;
|
||||||
icon?: Component<SvelteHTMLElements["svg"]>;
|
icon?: Component<SvelteHTMLElements["svg"]>;
|
||||||
textClass?: ClassValue;
|
textClass?: ClassValue;
|
||||||
@@ -19,6 +19,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<p class={["text-3xl font-bold", textClassName]}>
|
<p class={["text-3xl font-bold", textClassName]}>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,5 +19,5 @@
|
|||||||
class="w-full"
|
class="w-full"
|
||||||
iconClass={["rounded-lg bg-gray-200 p-1 !text-base", iconColor]}
|
iconClass={["rounded-lg bg-gray-200 p-1 !text-base", iconColor]}
|
||||||
>
|
>
|
||||||
{@render children?.()}
|
{@render children()}
|
||||||
</IconEntryButton>
|
</IconEntryButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user