mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-18 07:58:57 +00:00
디렉터리 페이지 레이아웃 구현 및 디렉터리 생성 구현
This commit is contained in:
30
src/lib/components/buttons/EntryButton.svelte
Normal file
30
src/lib/components/buttons/EntryButton.svelte
Normal file
@@ -0,0 +1,30 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
import IconChevronRight from "~icons/material-symbols/chevron-right";
|
||||
|
||||
interface Props {
|
||||
children: Snippet;
|
||||
onclick?: () => void;
|
||||
}
|
||||
|
||||
let { children, onclick }: Props = $props();
|
||||
</script>
|
||||
|
||||
<button
|
||||
onclick={() => {
|
||||
setTimeout(() => {
|
||||
onclick?.();
|
||||
}, 100);
|
||||
}}
|
||||
class="w-full rounded-xl active:bg-gray-100"
|
||||
>
|
||||
<div class="flex w-full items-stretch justify-between p-2 transition active:scale-95">
|
||||
<div>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
<div class="flex items-center justify-center">
|
||||
<IconChevronRight class="text-xl text-gray-800" />
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
Reference in New Issue
Block a user