카테고리 이름 변경 및 삭제, 카테고리에서 파일 삭제 구현

This commit is contained in:
static
2025-01-22 15:39:48 +09:00
parent 4c0d668cc1
commit 368868910d
20 changed files with 507 additions and 54 deletions

View File

@@ -0,0 +1,30 @@
<script lang="ts">
import { Modal } from "$lib/components";
import { Button } from "$lib/components/buttons";
import { TextInput } from "$lib/components/inputs";
interface Props {
onCreateClick: (name: string) => void;
isOpen: boolean;
}
let { onCreateClick, isOpen = $bindable() }: Props = $props();
let name = $state("");
const closeModal = () => {
name = "";
isOpen = false;
};
</script>
<Modal bind:isOpen onclose={closeModal}>
<p class="text-xl font-bold">새 카테고리</p>
<div class="mt-2 flex w-full">
<TextInput bind:value={name} placeholder="카테고리 이름" />
</div>
<div class="mt-7 flex gap-2">
<Button color="gray" onclick={closeModal}>닫기</Button>
<Button onclick={() => onCreateClick(name)}>만들기</Button>
</div>
</Modal>