diff --git a/src/lib/components/input/Input.svelte b/src/lib/components/input/Input.svelte index b3018863..a18f1f81 100644 --- a/src/lib/components/input/Input.svelte +++ b/src/lib/components/input/Input.svelte @@ -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); diff --git a/src/lib/components/input/Label.svelte b/src/lib/components/input/Label.svelte index 4a1756af..8e1395a2 100644 --- a/src/lib/components/input/Label.svelte +++ b/src/lib/components/input/Label.svelte @@ -8,8 +8,8 @@ import type { Writable } from 'svelte/store'; const forwardEvents = forwardEventsBuilder(get_current_component()); - const name: string = getContext('name'); - const error: Writable = getContext('error'); + const name: string = getContext('input-name'); + const error: Writable = getContext('input-error'); let defaultClass = 'block text-sm font-medium'; $: if ($error && $error.length > 0) {