mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
카테고리 목록에서 파일 목록을 재귀적으로 표시할 수 있는 기능 구현
This commit is contained in:
23
src/lib/components/inputs/CheckBox.svelte
Normal file
23
src/lib/components/inputs/CheckBox.svelte
Normal file
@@ -0,0 +1,23 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
import IconCheckCircle from "~icons/material-symbols/check-circle";
|
||||
import IconCheckCircleOutline from "~icons/material-symbols/check-circle-outline";
|
||||
|
||||
interface Props {
|
||||
children: Snippet;
|
||||
checked?: boolean;
|
||||
}
|
||||
|
||||
let { children, checked = $bindable(false) }: Props = $props();
|
||||
</script>
|
||||
|
||||
<label class="flex items-center justify-center gap-x-1">
|
||||
<input bind:checked type="checkbox" class="hidden" />
|
||||
{@render children?.()}
|
||||
{#if checked}
|
||||
<IconCheckCircle class="text-primary-600" />
|
||||
{:else}
|
||||
<IconCheckCircleOutline class="text-gray-300" />
|
||||
{/if}
|
||||
</label>
|
||||
Reference in New Issue
Block a user