finish custom class and improved options overhaul

This commit is contained in:
Elijah Duffy
2025-07-03 14:45:23 -07:00
parent c54002f5fa
commit 02311a0e7b
16 changed files with 170 additions and 131 deletions

View File

@@ -1,12 +1,16 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import type { ClassValue } from 'svelte/elements';
let {
for: target,
error,
bigError,
children
}: { for: string; error?: boolean; bigError?: boolean; children: Snippet } = $props();
interface Props {
for: string;
error?: boolean;
bigError?: boolean;
class?: ClassValue | null | undefined;
children: Snippet;
}
let { for: target, error, bigError, class: classValue, children }: Props = $props();
</script>
<label
@@ -16,7 +20,8 @@
error && !bigError
? 'mt-1 text-sm font-normal text-red-500'
: 'text-text dark:text-background mb-2 text-base font-medium',
bigError && 'text-red-500!'
bigError && 'text-red-500!',
classValue
]}
>
{@render children()}