Skip to content

Commit

Permalink
fix: Next Button Component with href (#1294)
Browse files Browse the repository at this point in the history
  • Loading branch information
reesebre82 authored Oct 3, 2024
1 parent 8e2a8e4 commit bacd61c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion sites/docs/src/lib/registry/default/ui/button/button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
</script>

{#if href}
<a bind:this={ref} class={cn(buttonVariants({ variant, size, className }))} {...restProps}>
<a
bind:this={ref}
class={cn(buttonVariants({ variant, size, className }))}
{href}
{...restProps}
>
{@render children?.()}
</a>
{:else}
Expand Down
7 changes: 6 additions & 1 deletion sites/docs/src/lib/registry/new-york/ui/button/button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
</script>

{#if href}
<a bind:this={ref} class={cn(buttonVariants({ variant, size, className }))} {...restProps}>
<a
bind:this={ref}
class={cn(buttonVariants({ variant, size, className }))}
{href}
{...restProps}
>
{@render children?.()}
</a>
{:else}
Expand Down

0 comments on commit bacd61c

Please sign in to comment.