Dialog.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!-- Fenêtre de dialogue -->
  2. <template>
  3. <v-dialog
  4. :model-value="show"
  5. persistent
  6. max-width="800"
  7. :content-class="contentClass"
  8. >
  9. <v-card class="d-flex flex-row">
  10. <div class="dialog-type flex-column justify-center d-none d-sm-flex">
  11. <h3 class="d-flex">
  12. <slot name="dialogType" />
  13. </h3>
  14. </div>
  15. <div class="dialog-container d-flex flex-column flex-grow-1">
  16. <v-card-title class="dialog-title">
  17. <slot name="dialogTitle" />
  18. </v-card-title>
  19. <div class="dialog-text-container">
  20. <slot name="dialogText" />
  21. </div>
  22. <v-spacer />
  23. <v-divider />
  24. <v-card-actions class="justify-center">
  25. <slot name="dialogBtn" />
  26. </v-card-actions>
  27. </div>
  28. </v-card>
  29. </v-dialog>
  30. </template>
  31. <script setup lang="ts">
  32. const props = defineProps({
  33. show: {
  34. type: Boolean,
  35. required: true
  36. },
  37. contentClass: {
  38. type: String,
  39. required: false
  40. }
  41. })
  42. </script>
  43. <style lang="scss" scoped>
  44. .dialog-title {
  45. background: #e6e6e6;
  46. padding-left: 40px;
  47. font-weight: normal;
  48. }
  49. .dialog-type {
  50. background: rgb(var(--v-theme-ot-green, #00AD8E));
  51. color: #fff;
  52. width: 50px;
  53. min-height: 400px;
  54. padding: 25px 10px;
  55. h3 {
  56. font-size: 25px;
  57. font-weight: normal;
  58. writing-mode: vertical-lr;
  59. transform: rotate(-180deg);
  60. }
  61. }
  62. .dialog-text-container {
  63. max-height: 70vh;
  64. overflow: auto;
  65. }
  66. .modal-level-alert {
  67. .dialog-type{
  68. background: rgb(var(--v-theme-ot-danger, #f56954));
  69. }
  70. }
  71. .modal-level-warning {
  72. .dialog-type{
  73. background: rgb(var(--v-theme-ot-warning, #f39c12));
  74. }
  75. }
  76. </style>