Skip to content

Commit

Permalink
[fix](@svelteui/core): avoid passing an unknown prop htmlFor to Label…
Browse files Browse the repository at this point in the history
…Element (#476)

ISSUES CLOSED: #475
  • Loading branch information
biolds authored Oct 19, 2023
1 parent 5d5837b commit 4e86d1e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
size: $$Props['size'] = 'sm';
export { className as class };
let _labelProps;
$: {
_labelProps = labelElement === 'label' ? { htmlFor: id, ...labelProps } : { ...labelProps };
}
$: ({ cx, classes, getStyles } = useStyles({ size }, { name: 'InputWrapper' }));
</script>

Expand All @@ -37,7 +33,7 @@
{...$$restProps}
>
{#if label}
<LabelElement class={classes.label} {..._labelProps} {label} {id} {labelElement} {required} />
<LabelElement class={classes.label} {...labelProps} {label} {id} {labelElement} {required} />
{/if}
{#if description}
<Text {...descriptionProps} color="gray" class={classes.description}>
Expand Down

0 comments on commit 4e86d1e

Please sign in to comment.