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.

69 lines
1.2 KiB

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