button: set default type property
This commit is contained in:
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user