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

64 lines
1.4 KiB
Vue
Raw Normal View History

<template>
<div class="field is-grouped">
<div class="control">
2022-06-24 09:10:49 +02:00
<v-button :id="submitId" :color="color" :isLoading="isBusy" :disabled="isDisabled" >{{ caption }}</v-button>
</div>
<div class="control" v-if="showCancelButton">
2022-06-24 09:10:49 +02:00
<router-link :id="cancelId" :to="{ name: cancelLandingView }" class="button is-text">{{ $t('commons.cancel') }}</router-link>
</div>
</div>
</template>
<script>
export default {
name: 'FormButtons',
data() {
return {
}
},
props: {
showCancelButton: {
type: Boolean,
default: false
},
isBusy: {
type: Boolean,
default: false
},
isDisabled: {
type: Boolean,
default: false
},
caption: {
type: String,
default: 'Submit'
},
cancelLandingView: {
type: String,
default: ''
},
color: {
type: String,
default: 'is-link'
},
2022-06-24 09:10:49 +02:00
submitId: {
type: String,
default: 'btnSubmit'
},
cancelId: {
type: String,
default: 'btnCancel'
},
}
}
</script>