Skip to content

Commit fb15c8c

Browse files
committedFeb 7, 2023
fix: menu popup scroll
1 parent ad3c1f5 commit fb15c8c

File tree

5 files changed

+44
-40
lines changed

5 files changed

+44
-40
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.4.2
2+
3+
- fix menu popup scroll [#337](https://github.com/MyEtherWallet/mew-components/pull/337)
4+
15
### 1.4.1
26

37
- dark theme notification slot color issues [#336](https://github.com/MyEtherWallet/mew-components/pull/336)

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@myetherwallet/mew-components",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "MEW Components",
55
"main": "dist/mew-components.umd.js",
66
"module": "dist/mew-components.esm.js",

‎src/components/MewMenuPopup/MewMenuPopup.vue

+16-16
Original file line numberDiff line numberDiff line change
@@ -64,48 +64,48 @@ export default {
6464
props: {
6565
icon: {
6666
type: Boolean,
67-
default: false
67+
default: false,
6868
},
6969
outlined: {
7070
type: Boolean,
71-
default: false
71+
default: false,
7272
},
7373
color: {
7474
type: String,
75-
default: 'white'
75+
default: 'white',
7676
},
7777
btnTitle: {
7878
type: String,
79-
default: ''
79+
default: '',
8080
},
8181
btnSize: {
8282
type: String,
83-
default: 'large'
83+
default: 'large',
8484
},
8585
btnFontSize: {
8686
type: String,
87-
default: '14px'
87+
default: '14px',
8888
},
8989
btnIcon: {
9090
type: String,
91-
default: ''
91+
default: '',
9292
},
9393
btnIconSize: {
9494
type: String,
95-
default: '30px'
95+
default: '30px',
9696
},
9797
left: {
9898
type: Boolean,
99-
default: false
99+
default: false,
100100
},
101101
right: {
102102
type: Boolean,
103-
default: false
104-
}
103+
default: false,
104+
},
105105
},
106106
data() {
107107
return {
108-
show: false
108+
show: false,
109109
};
110110
},
111111
computed: {
@@ -140,7 +140,7 @@ export default {
140140
left: 50%;
141141
transform: translate(-50%, 0);
142142
`;
143-
}
143+
},
144144
},
145145
methods: {
146146
toggleMenu() {
@@ -167,8 +167,8 @@ export default {
167167
this.show = false;
168168
window.removeEventListener('click', this.detactOutsideClick);
169169
}
170-
}
171-
}
170+
},
171+
},
172172
};
173173
</script>
174174

@@ -219,7 +219,7 @@ export default {
219219
.mew-menu-popup-content {
220220
background-color: white;
221221
border-radius: 4px;
222-
overflow: hidden;
222+
overflow: scroll;
223223
box-shadow: 0 5px 5px -3px rgb(13 41 66 / 20%),
224224
0 8px 10px 1px rgb(13 41 66 / 14%), 0 3px 14px 2px rgb(13 41 66 / 12%);
225225
position: absolute;
+22-22
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import {
2-
withKnobs,
3-
boolean,
4-
text,
5-
optionsKnob
6-
} from '@storybook/addon-knobs';
1+
import { withKnobs, boolean, text, optionsKnob } from '@storybook/addon-knobs';
72
import MewMenuPopup from '@/components/MewMenuPopup/MewMenuPopup.vue';
83
import MewMenuDoc from './MewMenuPopup.mdx';
94

@@ -13,57 +8,62 @@ export default {
138
component: MewMenuPopup,
149
docs: {
1510
page: MewMenuDoc,
16-
inlineStories: true
17-
}
11+
inlineStories: true,
12+
},
1813
},
19-
decorators: [withKnobs]
14+
decorators: [withKnobs],
2015
};
2116

2217
const btnSizeOptions = {
2318
'x-small': 'x-small',
2419
small: 'small',
2520
default: 'default',
2621
large: 'large',
27-
'x-large': 'x-large'
22+
'x-large': 'x-large',
2823
};
2924

3025
// used to display options on knob
3126
const optionsObj = {
32-
display: 'inline-radio'
27+
display: 'inline-radio',
3328
};
3429

3530
export const MEWMenuPopup = () => ({
3631
components: { MewMenuPopup },
3732
props: {
3833
btnTitle: {
39-
default: text('btn-title', 'Click')
34+
default: text('btn-title', 'Click'),
4035
},
4136
btnSize: {
42-
default: optionsKnob('btn-size', btnSizeOptions, btnSizeOptions.large , optionsObj)
37+
default: optionsKnob(
38+
'btn-size',
39+
btnSizeOptions,
40+
btnSizeOptions.large,
41+
optionsObj
42+
),
4343
},
4444
left: {
45-
default: boolean('left', false)
45+
default: boolean('left', false),
4646
},
4747
right: {
48-
default: boolean('right', false)
48+
default: boolean('right', false),
4949
},
5050
icon: {
51-
default: boolean('icon', false)
51+
default: boolean('icon', false),
5252
},
5353
outlined: {
54-
default: boolean('outlined', false)
54+
default: boolean('outlined', false),
5555
},
5656
btnFontSize: {
57-
default: text('btn-font-size', '12px')
57+
default: text('btn-font-size', '12px'),
5858
},
5959
color: {
60-
default: text('color', 'primary')
61-
}
60+
default: text('color', 'primary'),
61+
},
6262
},
6363
watch: {
6464
enableDarkMode(newVal) {
6565
this.$vuetify.theme.dark = newVal === true ? true : false;
66-
}
66+
},
6767
},
6868
template: `
6969
<div class="bgStorybook pa-15" style="display: inline-block; margin: 0 auto">
@@ -85,5 +85,5 @@ export const MEWMenuPopup = () => ({
8585
</ul>
8686
</div>
8787
</mew-menu-popup>
88-
</div>`
88+
</div>`,
8989
});

0 commit comments

Comments
 (0)
Please sign in to comment.