FormButtons.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div class="field is-grouped">
  3. <div class="control">
  4. <v-button :color="color" :isLoading="isBusy" :disabled="isDisabled" >{{ caption }}</v-button>
  5. </div>
  6. <div class="control" v-if="showCancelButton">
  7. <router-link :to="{ name: cancelLandingView }" class="button is-text">{{ $t('commons.cancel') }}</router-link>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'FormButtons',
  14. data() {
  15. return {
  16. }
  17. },
  18. props: {
  19. showCancelButton: {
  20. type: Boolean,
  21. default: false
  22. },
  23. isBusy: {
  24. type: Boolean,
  25. default: false
  26. },
  27. isDisabled: {
  28. type: Boolean,
  29. default: false
  30. },
  31. caption: {
  32. type: String,
  33. default: 'Submit'
  34. },
  35. cancelLandingView: {
  36. type: String,
  37. default: ''
  38. },
  39. color: {
  40. type: String,
  41. default: 'is-link'
  42. },
  43. }
  44. }
  45. </script>