Button 및 Input 컴포넌트를 atoms 디렉터리로 이동 및 리팩토링

This commit is contained in:
static
2025-01-24 16:39:09 +09:00
parent a01137bbf9
commit 1c09d93b41
33 changed files with 145 additions and 172 deletions

View File

@@ -0,0 +1,19 @@
<script lang="ts">
import type { Snippet } from "svelte";
interface Props {
children?: Snippet;
onclick?: () => void;
}
let { children, onclick }: Props = $props();
</script>
<button
onclick={onclick && (() => setTimeout(onclick, 100))}
class="text-sm font-medium text-gray-800 underline underline-offset-2 active:rounded-xl active:bg-gray-100"
>
<div class="h-full p-1 transition active:scale-95">
{@render children?.()}
</div>
</button>