-
Notifications
You must be signed in to change notification settings - Fork 48
/
exampleCustomDialog.vue
80 lines (76 loc) · 1.54 KB
/
exampleCustomDialog.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
<div class="example">
<h2>Custom Dialog Example</h2>
<div class="row">Show Picker in the popup dialog.</div>
<div class="row">
<button @click="emojiPickerCustomDialog = true">
Open Custom Dialog
</button>
</div>
<div class="popup" v-if="emojiPickerCustomDialog">
<div class="popup-box" @click="emojiPickerCustomDialog = false">
<div class="popup-content" @click="$event.stopPropagation()">
<div class="popup-close">
<a @click="emojiPickerCustomDialog = false">X</a>
</div>
<h2>Emoji Selector</h2>
<picker :data="index" :emojiSize="24" :native="true"></picker>
</div>
</div>
</div>
</div>
</template>
<script>
import { Picker } from '../src'
export default {
props: {
index: {
type: Object,
},
},
data() {
return {
emojiPickerCustomDialog: false,
}
},
methods: {},
components: {
Picker,
},
}
</script>
<style scoped>
.popup {
position: fixed;
width: 100%;
height: 100vh;
left: 0;
top: 0;
z-index: 200;
background: rebeccapurple;
opacity: 95%;
}
.popup-box {
height: 100%;
overflow: auto;
display: block;
padding-top: 120px;
padding-bottom: 80px;
}
.popup-content {
background: white;
box-shadow: 0px 24px 54px rgba(20, 28, 49, 0.14);
border-radius: 18px;
padding: 6px 6px 9px 6px;
position: relative;
width: 100%;
max-width: 462px;
margin: 0 auto;
}
.popup-close {
position: absolute;
top: 20px;
right: 30px;
cursor: pointer;
}
</style>