2FAuth/resources/js/components/formElements/Button.vue

33 lines
675 B
Vue
Raw Normal View History

<script setup>
const props = defineProps({
color: {
type: String,
default: 'is-link'
},
nativeType: {
type: String,
default: 'submit'
},
isLoading: {
type: Boolean,
default: false
},
isDisabled: {
type: Boolean,
default: false
}
})
</script>
<template>
<button
:type="nativeType"
:disabled="isLoading || isDisabled"
:class="{
'button': true,
[`${color}`]: true,
'is-loading': isLoading,
2023-10-26 08:53:48 +02:00
}">
<slot />
</button>
</template>