FormButtons.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="field is-grouped">
  3. <div class="control">
  4. <v-button :id="submitId" :color="color" :isLoading="isBusy" :disabled="isDisabled" >{{ caption }}</v-button>
  5. </div>
  6. <div class="control" v-if="showCancelButton">
  7. <router-link :id="cancelId" :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. submitId: {
  44. type: String,
  45. default: 'btnSubmit'
  46. },
  47. cancelId: {
  48. type: String,
  49. default: 'btnCancel'
  50. },
  51. }
  52. }
  53. </script>