기존에 제작된 모달들을 ActionModal 컴포넌트 기반으로 재구성

This commit is contained in:
static
2025-01-25 22:30:06 +09:00
parent 38a1c8d7e0
commit 7dba1cf4c6
26 changed files with 367 additions and 387 deletions

View File

@@ -50,7 +50,7 @@
<CategoryCreateModal
bind:isOpen={isCategoryCreateModalOpen}
oncreate={async (name: string) => {
onCreateClick={async (name: string) => {
if (await requestCategoryCreation(name, $category!.id, $masterKeyStore?.get(1)!)) {
category = getCategoryInfo($category!.id, $masterKeyStore?.get(1)?.key!); // TODO: FIXME
return true;

View File

@@ -1,23 +1,20 @@
<script lang="ts">
import { Button, Modal } from "$lib/components/atoms";
import { ActionModal } from "$lib/components/molecules";
interface Props {
onContinueClick: () => void;
isOpen: boolean;
onContinueClick: () => void;
}
let { onContinueClick, isOpen = $bindable() }: Props = $props();
let { isOpen = $bindable(), onContinueClick }: Props = $props();
</script>
<Modal bind:isOpen>
<div class="space-y-4">
<div class="space-y-2 break-keep">
<p class="text-xl font-bold">내보내지 않고 계속할까요?</p>
<p>암호 키 파일은 유출 방지를 위해 이 화면에서만 저장할 수 있어요.</p>
</div>
<div class="flex gap-x-2">
<Button color="gray" onclick={() => (isOpen = false)} class="flex-1">아니요</Button>
<Button onclick={onContinueClick} class="flex-1">계속할게요</Button>
</div>
</div>
</Modal>
<ActionModal
bind:isOpen
title="내보내지 않고 계속할까요?"
cancelText="아니요"
confirmText="계속할게요"
onConfirmClick={onContinueClick}
>
<p>암호 키 파일은 유출 방지를 위해 이 화면에서만 저장할 수 있어요.</p>
</ActionModal>