diff --git a/src/lib/components/molecules/ActionModal.svelte b/src/lib/components/molecules/ActionModal.svelte index 2912f62..058d572 100644 --- a/src/lib/components/molecules/ActionModal.svelte +++ b/src/lib/components/molecules/ActionModal.svelte @@ -12,7 +12,7 @@ confirmText: string; isOpen: boolean; onbeforeclose?: () => void; - onconfirm: ConfirmHandler; + onConfirmClick: ConfirmHandler; title: string; } @@ -22,7 +22,7 @@ confirmText, isOpen = $bindable(), onbeforeclose, - onconfirm, + onConfirmClick, title, }: Props = $props(); @@ -32,15 +32,17 @@ }; const confirmAction = async () => { - if ((await onconfirm()) !== false) { + if ((await onConfirmClick()) !== false) { closeModal(); } }; - -

{title}

- {@render children?.()} + +
+

{title}

+ {@render children?.()} +
diff --git a/src/lib/components/organisms/modals/CategoryCreateModal.svelte b/src/lib/components/organisms/modals/CategoryCreateModal.svelte index 85cd48e..1e2ed55 100644 --- a/src/lib/components/organisms/modals/CategoryCreateModal.svelte +++ b/src/lib/components/organisms/modals/CategoryCreateModal.svelte @@ -14,5 +14,5 @@ title="새 카테고리" placeholder="카테고리 이름" submitText="만들기" - onsubmit={oncreate} + onSubmitClick={oncreate} /> diff --git a/src/lib/components/organisms/modals/RenameModal.svelte b/src/lib/components/organisms/modals/RenameModal.svelte index 503f4dd..66ccfe0 100644 --- a/src/lib/components/organisms/modals/RenameModal.svelte +++ b/src/lib/components/organisms/modals/RenameModal.svelte @@ -4,11 +4,11 @@ interface Props { isOpen: boolean; onbeforeclose?: () => void; - onrename: (newName: string) => Promise; + onRenameClick: (newName: string) => Promise; originalName: string | undefined; } - let { isOpen = $bindable(), onbeforeclose, onrename, originalName }: Props = $props(); + let { isOpen = $bindable(), onbeforeclose, onRenameClick, originalName }: Props = $props(); diff --git a/src/lib/components/organisms/modals/TextInputModal.svelte b/src/lib/components/organisms/modals/TextInputModal.svelte index 196dcc7..9131a11 100644 --- a/src/lib/components/organisms/modals/TextInputModal.svelte +++ b/src/lib/components/organisms/modals/TextInputModal.svelte @@ -6,7 +6,7 @@ defaultValue?: string; isOpen: boolean; onbeforeclose?: () => void; - onsubmit: (value: string) => ReturnType; + onSubmitClick: (value: string) => ReturnType; placeholder: string; submitText: string; title: string; @@ -16,7 +16,7 @@ defaultValue = "", isOpen = $bindable(), onbeforeclose, - onsubmit, + onSubmitClick, placeholder, submitText, title, @@ -36,7 +36,7 @@ {onbeforeclose} {title} confirmText={submitText} - onconfirm={() => onsubmit(value)} + onConfirmClick={() => onSubmitClick(value)} > - + diff --git a/src/routes/(main)/category/[[id]]/+page.svelte b/src/routes/(main)/category/[[id]]/+page.svelte index 3f18804..dc701ba 100644 --- a/src/routes/(main)/category/[[id]]/+page.svelte +++ b/src/routes/(main)/category/[[id]]/+page.svelte @@ -89,7 +89,7 @@ bind:isOpen={isCategoryRenameModalOpen} onbeforeclose={() => (selectedSubCategory = undefined)} originalName={selectedSubCategory?.name} - onrename={async (newName: string) => { + onRenameClick={async (newName: string) => { if (await requestCategoryRename(selectedSubCategory!, newName)) { info = getCategoryInfo(data.id, $masterKeyStore?.get(1)?.key!); // TODO: FIXME return true; diff --git a/src/routes/(main)/directory/[[id]]/+page.svelte b/src/routes/(main)/directory/[[id]]/+page.svelte index 3e3d056..6e43b73 100644 --- a/src/routes/(main)/directory/[[id]]/+page.svelte +++ b/src/routes/(main)/directory/[[id]]/+page.svelte @@ -170,7 +170,7 @@ bind:isOpen={isDirectoryEntryRenameModalOpen} onbeforeclose={() => (selectedEntry = undefined)} originalName={selectedEntry?.name} - onrename={async (newName: string) => { + onRenameClick={async (newName: string) => { if (await requestDirectoryEntryRename(selectedEntry!, newName)) { info = getDirectoryInfo(data.id, $masterKeyStore?.get(1)?.key!); // TODO: FIXME return true;