2020-01-15 17:43:28 +01:00
|
|
|
<template>
|
|
|
|
<button
|
2020-01-21 17:03:00 +01:00
|
|
|
:type="nativeType"
|
2022-07-20 13:32:31 +02:00
|
|
|
:disabled="isLoading || isDisabled"
|
2020-01-15 17:43:28 +01:00
|
|
|
:class="{
|
2020-01-21 17:03:00 +01:00
|
|
|
'button': true,
|
2020-01-15 17:43:28 +01:00
|
|
|
[`${color}`]: true,
|
2020-01-21 17:03:00 +01:00
|
|
|
'is-loading': isLoading,
|
2022-07-20 13:32:31 +02:00
|
|
|
}"
|
|
|
|
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'
|
|
|
|
},
|
|
|
|
|
2020-01-21 17:03:00 +01:00
|
|
|
isLoading: {
|
2020-01-15 17:43:28 +01:00
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
2022-07-20 13:32:31 +02:00
|
|
|
|
|
|
|
isDisabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
2020-01-15 17:43:28 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|