partially refactor components to ui package

This commit is contained in:
Elijah Duffy
2025-04-13 07:56:23 -07:00
commit bf2ef338e9
21 changed files with 2104 additions and 0 deletions

23
components/Label.svelte Normal file
View File

@@ -0,0 +1,23 @@
<script lang="ts">
import type { Snippet } from 'svelte';
let {
for: target,
error,
bigError,
children
}: { for: string; error?: boolean; bigError?: boolean; children: Snippet } = $props();
</script>
<label
for={target}
class={[
'transition-fontColor block',
error && !bigError
? 'mt-1 text-sm font-normal text-red-500'
: 'text-text dark:text-background mb-3 text-base font-medium',
bigError && 'text-red-500!'
]}
>
{@render children()}
</label>