mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
카테고리 이름 변경 및 삭제, 카테고리에서 파일 삭제 구현
This commit is contained in:
30
src/lib/organisms/CreateCategoryModal.svelte
Normal file
30
src/lib/organisms/CreateCategoryModal.svelte
Normal 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>
|
||||
Reference in New Issue
Block a user