adds type prop

This commit is contained in:
2026-05-12 21:46:52 -04:00
parent 386566e0dc
commit 377420574f
+5 -3
View File
@@ -1,9 +1,9 @@
<template> <template>
<button class="btn" <button class="btn"
type="button"
:aria-busy="loading" :aria-busy="loading"
:class="classes" :class="classes"
:disabled="disabled || loading"> :disabled="disabled || loading"
:type="type">
<template v-if="loading"> <template v-if="loading">
Loading... Loading...
</template> </template>
@@ -27,6 +27,7 @@ interface ButtonProps {
loading?: boolean loading?: boolean
size?: 'sm' | 'md' | 'lg' size?: 'sm' | 'md' | 'lg'
variant?: 'primary' | 'secondary' | 'danger' variant?: 'primary' | 'secondary' | 'danger'
type: 'button' | 'submit'
} }
const { const {
@@ -34,7 +35,8 @@ const {
size = "md", size = "md",
fullwidth = false, fullwidth = false,
disabled = false, disabled = false,
loading = false loading = false,
type = "button"
} = defineProps<ButtonProps>() } = defineProps<ButtonProps>()
const emit = defineEmits(['click']) const emit = defineEmits(['click'])