Skip to content

Commit

Permalink
fix(svelte): use <a> if button has href
Browse files Browse the repository at this point in the history
fixes #141
  • Loading branch information
nolimits4web committed Apr 21, 2023
1 parent 8c6ff6f commit 5c6defd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/svelte/components/Button.svelte
Expand Up @@ -184,11 +184,13 @@
className
);
const Component = component === 'button' && href ? 'a' : component;
</script>

{#if typeof component === 'string'}
<svelte:element
this={component}
this={Component}
bind:this={rippleEl.current}
class={classes}
{disabled}
Expand Down

0 comments on commit 5c6defd

Please sign in to comment.