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.

113 lines
2.5 KiB

2 years ago
  1. <template>
  2. <modal
  3. name="faq"
  4. height="auto"
  5. :scrollable="true"
  6. :clickToClose="true"
  7. class="tw-z-[9999]"
  8. >
  9. <div class="tw-text-base-primary xl:tw-p-[5px]">
  10. <div
  11. class="modal-header tw-flex tw-w-full tw-justify-center tw-mb-[32px] md:tw-mb-[21px] xl:tw-justify-start"
  12. >
  13. <button
  14. class="close tw-transition tw-btn-md"
  15. @click="$modal.hide('faq')"
  16. ></button>
  17. <div class="t18 tw-mt-[30px] xl:tw-text-[20px]">FAQ</div>
  18. </div>
  19. <div
  20. class="modal-content tw-head-body tw-grid tw-gap-[10px] tw-grid-cols-1 tw-px-[20px] md:tw-text-[12px]"
  21. >
  22. <div class="faq">
  23. <div
  24. class="tw-mb-[16px] md:tw-mb-[20px]"
  25. v-for="(item, index) in faq"
  26. :key="index"
  27. >
  28. <div
  29. class="tw-head-body tw-text-base-primary tw-font-medium md:tw-body-3"
  30. >
  31. Q: {{ item.question }}
  32. </div>
  33. <div class="tw-head-body tw-text-base-primary md:tw-body-3">
  34. A: {{ item.answer }}
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </modal>
  41. </template>
  42. <script>
  43. export default {
  44. name: "faq-Modal",
  45. data() {
  46. return {};
  47. },
  48. props: {
  49. faq: {
  50. type: Array,
  51. },
  52. },
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. .close {
  57. position: absolute;
  58. right: 25px;
  59. top: 30px;
  60. background-image: url("~/assets/svg/close.svg");
  61. background-position: center;
  62. background-repeat: no-repeat;
  63. background-size: cover;
  64. width: 14px;
  65. height: 14px;
  66. @media screen and (min-width: 1366px) {
  67. margin-left: 530px;
  68. }
  69. }
  70. .v--modal-overlay::v-deep {
  71. position: fixed;
  72. box-sizing: border-box;
  73. left: 0;
  74. bottom: 0;
  75. top: 0;
  76. right: 0;
  77. width: 100%;
  78. height: 100%;
  79. background: rgba(0, 0, 0, 0.2);
  80. z-index: 99999 !important;
  81. opacity: 1;
  82. .v--modal {
  83. width: 100% !important;
  84. max-width: 100% !important;
  85. height: auto;
  86. max-height: 640px;
  87. border-top-left-radius: 16px;
  88. border-top-right-radius: 16px;
  89. top: 0 !important;
  90. left: 0 !important;
  91. right: 0 !important;
  92. margin: 0;
  93. @media screen and (min-width: 768px) {
  94. height: auto;
  95. max-height: 900px;
  96. }
  97. }
  98. .v--modal-box {
  99. overflow: auto;
  100. }
  101. .v--modal-background-click {
  102. display: flex;
  103. align-items: flex-end;
  104. @media screen and (min-width: 768px) {
  105. display: flex !important;
  106. align-items: flex-end !important;
  107. }
  108. }
  109. }
  110. </style>