You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.2 KiB

2 years ago
4 years ago
4 years ago
  1. <template>
  2. <v-card>
  3. <v-toolbar color="primary white--text" flat>
  4. <v-toolbar-title>{{ title }}</v-toolbar-title>
  5. </v-toolbar>
  6. <v-card-text class="text--primary mt-3 pl-4">
  7. <slot name="content" />
  8. </v-card-text>
  9. <v-card-actions>
  10. <v-spacer />
  11. <v-btn
  12. v-if="cancelText"
  13. class="text-capitalize"
  14. text
  15. color="primary"
  16. data-test="cancel-button"
  17. @click="cancel"
  18. >
  19. {{ cancelText }}
  20. </v-btn>
  21. <v-btn
  22. v-if="agreeText"
  23. :disabled="disabled"
  24. class="text-none"
  25. text
  26. data-test="delete-button"
  27. @click="agree"
  28. >
  29. {{ agreeText }}
  30. </v-btn>
  31. </v-card-actions>
  32. </v-card>
  33. </template>
  34. <script lang="ts">
  35. import Vue from 'vue'
  36. export default Vue.extend({
  37. props: {
  38. title: {
  39. type: String,
  40. default: '',
  41. required: true
  42. },
  43. cancelText: {
  44. type: String,
  45. default: ''
  46. },
  47. agreeText: {
  48. type: String,
  49. default: ''
  50. },
  51. disabled: {
  52. type: Boolean,
  53. default: false
  54. }
  55. },
  56. methods: {
  57. agree() {
  58. this.$emit('agree')
  59. },
  60. cancel() {
  61. this.$emit('cancel')
  62. }
  63. }
  64. })
  65. </script>