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.

70 lines
1.2 KiB

  1. <template>
  2. <v-card>
  3. <v-card-title class="grey lighten-2">
  4. {{ title }}
  5. </v-card-title>
  6. <v-container grid-list-sm>
  7. <v-layout wrap>
  8. <v-flex xs12>
  9. <slot name="content" />
  10. </v-flex>
  11. </v-layout>
  12. </v-container>
  13. <v-card-actions>
  14. <v-spacer />
  15. <v-btn
  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. class="text-none"
  26. text
  27. :disabled="disabled"
  28. data-test="delete-button"
  29. @click="agree"
  30. >
  31. {{ agreeText }}
  32. </v-btn>
  33. </v-card-actions>
  34. </v-card>
  35. </template>
  36. <script>
  37. export default {
  38. props: {
  39. title: {
  40. type: String,
  41. default: '',
  42. required: true
  43. },
  44. cancelText: {
  45. type: String,
  46. default: '',
  47. required: true
  48. },
  49. agreeText: {
  50. type: String,
  51. default: '',
  52. required: true
  53. },
  54. disabled: {
  55. type: Boolean,
  56. default: false
  57. }
  58. },
  59. methods: {
  60. agree() {
  61. this.$emit('agree')
  62. },
  63. cancel() {
  64. this.$emit('cancel')
  65. }
  66. }
  67. }
  68. </script>