PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.1
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.1
1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / frontend / vue / components / Modals / Base / BaseModal.vue
hostinger-reach / frontend / vue / components / Modals / Base Last commit date
BaseModal.vue 10 months ago
BaseModal.vue
97 lines
1 <script lang="ts" setup>
2 import { onMounted, onUnmounted } from 'vue';
3
4 import { useScrollLock } from '@/composables/useScrollLock';
5
6 interface Props {
7 title?: string;
8 subtitle?: string;
9 titleAlignment?: 'centered' | 'left';
10 disableScroll?: boolean;
11 }
12
13 const props = withDefaults(defineProps<Props>(), {
14 titleAlignment: 'left',
15 disableScroll: true
16 });
17
18 const { lockScroll, unlockScroll } = useScrollLock();
19
20 onMounted(() => {
21 if (props.disableScroll) {
22 lockScroll();
23 }
24 });
25
26 onUnmounted(() => {
27 if (props.disableScroll) {
28 unlockScroll();
29 }
30 });
31 </script>
32
33 <template>
34 <div class="base-modal">
35 <div class="base-modal__header">
36 <slot name="back-button"></slot>
37 <span
38 class="base-modal__title-container"
39 :class="{
40 'base-modal__title-container--centered': titleAlignment === 'centered'
41 }"
42 >
43 <slot name="title-icon"></slot>
44 <h2 v-if="title" class="base-modal__title">{{ title }}</h2>
45 </span>
46 </div>
47 <p
48 v-if="subtitle"
49 class="base-modal__subtitle"
50 :class="{
51 'base-modal__subtitle--centered': titleAlignment === 'centered'
52 }"
53 >
54 {{ subtitle }}
55 </p>
56 <slot></slot>
57 </div>
58 </template>
59
60 <style lang="scss" scoped>
61 .base-modal {
62 &__header {
63 position: relative;
64 margin-bottom: 8px;
65 margin-top: -4px;
66 }
67
68 &__title-container {
69 display: flex;
70 align-items: center;
71 justify-content: flex-start;
72
73 &--centered {
74 justify-content: center;
75 }
76 }
77
78 &__title {
79 font-size: 20px;
80 color: var(--neutral--700);
81 margin: 0;
82 font-weight: 700;
83 }
84
85 &__subtitle {
86 font-size: 14px;
87 margin-top: 4px;
88 margin-bottom: 24px;
89 color: var(--neutral--500);
90
91 &--centered {
92 text-align: center;
93 }
94 }
95 }
96 </style>
97