Skip to content

Commit 57dad7f

Browse files
authoredJun 2, 2022
Merge pull request #253 from MyEtherWallet/fix/fix-mew-popup-close-button
fix: mew-popup close button z-index value to locate the button on top
2 parents 1f097f2 + 6dca479 commit 57dad7f

File tree

1 file changed

+25
-40
lines changed

1 file changed

+25
-40
lines changed
 

‎src/components/MewPopup/MewPopup.vue

+25-40
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@
1212
:scrollable="scrollable"
1313
@click:outside="handleClickOutside"
1414
>
15-
<v-card
16-
color="white"
17-
class="pa-0"
18-
>
15+
<v-card color="white" class="pa-0">
1916
<!--
2017
=====================================================================================
2118
Dialog Header
2219
=====================================================================================
2320
-->
2421
<div :class="title ? 'pt-0' : 'pt-5'">
25-
<v-btn
26-
v-if="!hideCloseBtn"
27-
icon
28-
class="header-close-icon"
29-
>
22+
<v-btn v-if="!hideCloseBtn" icon class="header-close-icon">
3023
<v-icon
3124
size="x-large"
3225
color="grey cursor--pointer"
@@ -40,12 +33,10 @@
4033
v-if="title"
4134
:class="[
4235
'justify-center px-5 px-md-7',
43-
hasBodyContent ? 'py-5 py-md-8' : 'pb-0 pt-5 pt-md-8',
36+
hasBodyContent ? 'py-5 py-md-8' : 'pb-0 pt-5 pt-md-8'
4437
]"
4538
>
46-
<div
47-
class="mew-heading-2 break-word text-center"
48-
>
39+
<div class="mew-heading-2 break-word text-center">
4940
{{ title }}
5041
</div>
5142
</v-card-title>
@@ -66,15 +57,8 @@
6657
Dialog action
6758
=====================================================================================
6859
-->
69-
<v-card-actions
70-
v-if="hasButtons"
71-
class="py-5 py-md-8"
72-
>
73-
<v-row
74-
class="pa-0"
75-
justify="space-around"
76-
dense
77-
>
60+
<v-card-actions v-if="hasButtons" class="py-5 py-md-8">
61+
<v-row class="pa-0" justify="space-around" dense>
7862
<v-col
7963
cols="12"
8064
:sm="!rightBtn ? '12' : '6'"
@@ -115,7 +99,7 @@
11599
</template>
116100

117101
<script>
118-
import MewButton from '@/components/MewButton/MewButton.vue';
102+
import MewButton from "@/components/MewButton/MewButton.vue";
119103
120104
export default {
121105
components: { MewButton },
@@ -125,21 +109,21 @@ export default {
125109
*/
126110
title: {
127111
type: String,
128-
default: '',
112+
default: ""
129113
},
130114
/**
131115
* Hide top right close button
132116
*/
133117
hideCloseBtn: {
134118
type: Boolean,
135-
default: false,
119+
default: false
136120
},
137121
/**
138122
* Controls popup visibility.
139123
*/
140124
show: {
141125
type: Boolean,
142-
default: false,
126+
default: false
143127
},
144128
/**
145129
* Left Button: object of information.
@@ -149,8 +133,8 @@ export default {
149133
leftBtn: {
150134
type: Object,
151135
default: () => {
152-
return { text: 'Cancel', color: 'primary', method: () => {} };
153-
},
136+
return { text: "Cancel", color: "primary", method: () => {} };
137+
}
154138
},
155139
/**
156140
* Right Button: object of information.
@@ -160,58 +144,58 @@ export default {
160144
type: Object,
161145
default: () => {
162146
return {
163-
text: 'Confirm',
164-
color: 'primary',
147+
text: "Confirm",
148+
color: "primary",
165149
enabled: true,
166-
method: () => {},
150+
method: () => {}
167151
};
168-
},
152+
}
169153
},
170154
/**
171155
* Makes the popup content scrollable.
172156
*/
173157
scrollable: {
174158
type: Boolean,
175-
default: false,
159+
default: false
176160
},
177161
/**
178162
* Max width of the popup.
179163
*/
180164
maxWidth: {
181165
type: String,
182-
default: '600',
166+
default: "600"
183167
},
184168
/**
185169
* Displays v-card-text if there is popup body content
186170
* otherwise it removes it and adjusts the padding accordingly
187171
*/
188172
hasBodyContent: {
189173
type: Boolean,
190-
default: false,
174+
default: false
191175
},
192176
/**
193177
* Will display popup body content padding if true
194178
*/
195179
hasPadding: {
196180
type: Boolean,
197-
default: true,
181+
default: true
198182
},
199183
/**
200184
* Will display popup body content padding if true
201185
*/
202186
hasButtons: {
203187
type: Boolean,
204-
default: true,
205-
},
188+
default: true
189+
}
206190
},
207191
methods: {
208192
/**
209193
* Will call left btn method which is cancel method.
210194
*/
211195
handleClickOutside() {
212196
this.leftBtn.method();
213-
},
214-
},
197+
}
198+
}
215199
};
216200
</script>
217201

@@ -220,5 +204,6 @@ export default {
220204
right: 10px;
221205
top: 10px;
222206
position: absolute;
207+
z-index: 9;
223208
}
224209
</style>