-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpopup.tag
105 lines (103 loc) · 4.22 KB
/
popup.tag
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
require('../riotmui-elements/riotmui-desc/riotmui-desc.tag');
require('../riotmui-elements/riotmui-code/riotmui-code.tag');
require('../riotmui-elements/riotmui-option/riotmui-option.tag');
require('../material-elements/material-card/material-card.tag');
require('../material-elements/material-popup/material-popup.tag');
require('../material-elements/material-button/material-button.tag');
<popup>
<riotmui-desc name="desc">
<div class="riotmui-desc-examples row">
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 col-flex">
<material-card name="cardOne">
<div class="material-card-title">Default Popup</div>
<div class="material-card-content">
<material-button onclick="{{this.parent.parent.openPopupOne}}">
<div class="text">Open</div>
</material-button>
<material-popup name="popupOne">
<p>Accerso alius sententia ut mihi, phasmatis of interregnum ego dico, solvo meus mens mei,
ego dico phasmatis audite meus placitum meus mens quod iacio (Nombre de la persona)</p>
</material-popup>
</div>
<riotmui-code style="margin-top: 66px" code="{{this.parent.parent.example1}}"></riotmui-code>
</material-card>
</div>
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 col-flex">
<material-card name="cardTwo">
<div class="material-card-title">Popup With Title</div>
<div class="material-card-content">
<material-button onclick="{{this.parent.parent.openPopupTwo}}">
<div class="text">Open</div>
</material-button>
<material-popup name="popupTwo">
<div class="material-popup-title">Title</div>
<p>Accerso alius sententia ut mihi, phasmatis of interregnum ego dico, solvo meus mens mei,
ego dico phasmatis audite meus placitum meus mens quod iacio (Nombre de la persona)</p>
</material-popup>
</div>
<riotmui-code style="margin-top: 46px" code="{{this.parent.parent.example2}}"></riotmui-code>
</material-card>
</div>
</div>
<div class="riotmui-desc-description">
<p>
If you need popup just add this component to your project.
</p>
<div class="description-title" if="{{this.parent.children}}">Children</div>
<riotmui-option data="{{this.parent.children}}"></riotmui-option>
<div class="description-title" if="{{this.parent.options}}">Options</div>
<riotmui-option data="{{this.parent.options}}"></riotmui-option>
<div class="description-title" if="{{this.parent.methods}}">Methods,Listeners and Properties</div>
<riotmui-option data="{{this.parent.methods}}"></riotmui-option>
</div>
</riotmui-desc>
<script type="es6">
// Examples
this.example1 =
`<material-popup>
<p>Content</p>
</material-popup>`;
this.example2 =
`<material-popup>
<div class="material-popup-title">Title</div>
<p>Content</p>
</material-popup>`;
this.children = [
{
title: '<div>...</div>',
type:'tag',
default: '',
desc: 'Any content can be placed into material popup.'
},
{
title: '<div class="material-popup-title">Title</div>',
type:'tag',
default: '',
desc: 'Adds title to material popup.'
}
];
// Methods
this.methods = [
{
title: 'open',
type:'method',
default: '',
desc: 'Opens popup.'
},
{
title: 'close',
type:'method',
default: '',
desc: 'Closes popup.'
}
];
this.openPopupOne = ()=>{
let popup = this.tags.desc.tags.cardOne.tags.popupOne;
!popup.opened?popup.open():popup.close();
}
this.openPopupTwo = ()=>{
let popup = this.tags.desc.tags.cardTwo.tags.popupTwo;
!popup.opened?popup.open():popup.close();
}
</script>
</popup>