finish custom class and improved options overhaul
This commit is contained in:
@@ -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()}
|
||||
|
||||
Reference in New Issue
Block a user