Skip to content

Commit

Permalink
fix(Input): fixed naming for existing context
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Dec 30, 2022
1 parent 18f21b8 commit 2d1fa6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/input/Input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
value = undefined;
}
setContext('name', name);
setContext('error', currentError);
setContext('input-name', name);
setContext('input-error', currentError);
const defaultClass = 'group';
$: finalClass = twMerge(defaultClass, $$props.class);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/input/Label.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import type { Writable } from 'svelte/store';
const forwardEvents = forwardEventsBuilder(get_current_component());
const name: string = getContext('name');
const error: Writable<string | undefined> = getContext('error');
const name: string = getContext('input-name');
const error: Writable<string | undefined> = getContext('input-error');
let defaultClass = 'block text-sm font-medium';
$: if ($error && $error.length > 0) {
Expand Down

0 comments on commit 2d1fa6f

Please sign in to comment.