button: set default type property

This commit is contained in:
Elijah Duffy
2025-07-10 14:27:00 -07:00
parent ba78511ec2
commit 355850d1f2

View File

@@ -3,7 +3,7 @@
import type { ClassValue, HTMLButtonAttributes, MouseEventHandler } from 'svelte/elements'; import type { ClassValue, HTMLButtonAttributes, MouseEventHandler } from 'svelte/elements';
import Spinner from './Spinner.svelte'; import Spinner from './Spinner.svelte';
interface Props extends Omit<HTMLButtonAttributes, 'type' | 'class'> { interface Props extends Omit<HTMLButtonAttributes, 'class'> {
icon?: string; icon?: string;
animate?: boolean; animate?: boolean;
loading?: boolean; loading?: boolean;
@@ -14,6 +14,7 @@
} }
let { let {
type = 'button',
icon, icon,
animate = true, animate = true,
loading, loading,
@@ -72,6 +73,7 @@
</script> </script>
<button <button
{type}
bind:this={ref} bind:this={ref}
class={[ class={[
'button group relative flex gap-3 overflow-hidden rounded-sm px-5', 'button group relative flex gap-3 overflow-hidden rounded-sm px-5',