styled, raw input: improve error message control, add compact mode

This commit is contained in:
Elijah Duffy
2025-07-08 12:24:36 -07:00
parent 39ca78e837
commit 9d17fef232
3 changed files with 10 additions and 5 deletions

View File

@@ -9,7 +9,7 @@
id?: string;
label?: string;
value?: string;
invalidMessage?: string;
invalidMessage?: string | null;
ref?: HTMLInputElement | null;
class?: ClassValue | null | undefined;
}
@@ -46,7 +46,7 @@
{...others}
/>
{#if others.validate}
{#if others.validate && invalidMessage !== null}
<div class={['opacity-0 transition-opacity', !valid && 'opacity-100']}>
<Label for={id} error>
{invalidMessage}