Skip to content

Commit

Permalink
fix(TextField/Field): Expose id prop
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Sep 15, 2024
1 parent 949db8a commit e5445e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-suns-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': patch
---

fix(TextField/Field): Expose `id` prop
2 changes: 1 addition & 1 deletion packages/svelte-ux/src/lib/components/Field.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
$: hasPrepend = $$slots.prepend || icon != null;
$: hasAppend = $$slots.append || iconRight != null || clearable || error;
const id = uniqueId('field-');
export let id = uniqueId('field-');
let labelEl: HTMLLabelElement | null = null;
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-ux/src/lib/components/TextField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
$: hasPrefix = $$slots.prefix || type === 'currency';
$: hasSuffix = $$slots.suffix || type === 'percent';
const id = uniqueId('textfield-');
export let id = uniqueId('textfield-');
let labelEl: HTMLLabelElement | null = null;
</script>

Expand Down

0 comments on commit e5445e5

Please sign in to comment.