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

43 lines
815 B
Vue
Raw Normal View History

2020-01-15 17:43:28 +01:00
<template>
<button
:type="nativeType"
:disabled="isLoading || isDisabled"
2020-01-15 17:43:28 +01:00
:class="{
'button': true,
2020-01-15 17:43:28 +01:00
[`${color}`]: true,
'is-loading': isLoading,
}"
v-on:click="$emit('click')">
2020-01-15 17:43:28 +01:00
<slot />
</button>
</template>
<script>
export default {
name: 'VButton',
props: {
color: {
type: String,
default: 'is-link'
},
nativeType: {
type: String,
default: 'submit'
},
isLoading: {
2020-01-15 17:43:28 +01:00
type: Boolean,
default: false
},
isDisabled: {
type: Boolean,
default: false
}
2020-01-15 17:43:28 +01:00
}
}
</script>