Skip to content

Commit

Permalink
fix(InputNumber): 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 6c2c383 commit 18f21b8
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-number/InputNumber.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
if (!e.key.match(/^[0-9]+$/)) e.preventDefault();
}
setContext('name', name);
setContext('error', currentError);
setContext('input-number-name', name);
setContext('input-number-error', currentError);
</script>

<div class={$$props.class}>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/input-number/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> = getContext('error');
const name: string = getContext('input-number-name');
const error: Writable<string> = getContext('input-number-error');
let defaultClass = 'block text-sm font-medium';
if ($error) {
Expand Down

0 comments on commit 18f21b8

Please sign in to comment.