This repository was archived by the owner on Apr 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathOverlay.vue
49 lines (46 loc) · 1.57 KB
/
Overlay.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
<template>
<docs-content title='Overlay'>
<div slot='Overview' v-html='overviewContent'></div>
<div slot='Variants'>
<docs-code-block title='Default Overlay' :code='defaultCode'>
<ou-overlay v-model='overlayVisibility' />
<ou-button @click='showOverlay'>Show the overlay</ou-button>
</docs-code-block>
<docs-code-block title='Dark overlay' :code='darkCode'>
<ou-overlay type='dark' v-model='darkOverlayVisibility' />
<ou-button @click='showDarkOverlay'>Show the overlay</ou-button>
</docs-code-block>
</div>
<div slot='Implementation'>
<docs-table type='props' :data='overlayProps' name='Overlay' />
</div>
</docs-content>
</template>
<script>
import overviewContent from '../markdown/overlay/overview.md';
import defaultCode from '../markdown/overlay/defaultCode.md';
import darkCode from '../markdown/overlay/darkCode.md';
export default {
data() {
return {
overviewContent,
defaultCode,
darkCode,
overlayVisibility: false,
darkOverlayVisibility: false,
overlayProps: [
{ name: 'v-model', type: 'Boolean', required: 'false', description: "bind boolean value to the overlay to control it's visibility" },
{ name: 'type', type: 'String', required: 'false', acceptedValue: 'dark', description: 'the type of the overlay' }
]
};
},
methods: {
showOverlay() {
this.overlayVisibility = true;
},
showDarkOverlay() {
this.darkOverlayVisibility = true;
}
}
};
</script>