styled, raw input: improve error message control, add compact mode
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user