-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolymer-elem-switch.html
61 lines (48 loc) · 1.24 KB
/
polymer-elem-switch.html
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
<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="child-elements/vonage-element.html">
<link rel="import" href="child-elements/twilio-element.html">
<dom-module id="polymer-elem-switch">
<template>
<style>
:host {
display: block;
padding: 12px;
border-radius: 8px;
border: 1px solid #333;
}
vonage-element,
twilio-element {
padding: 10px;
border-radius: 8px;
border: 1px solid #999;
margin: 12px 0;
}
</style>
<h2>Parent</h2>
<h3> Value: [[value]] </h3>
<template is="dom-if" if="[[!useTwilioElement]]" restamp="true">
<vonage-element value="{{value}}"></vonage-element>
</template>
<template is="dom-if" if="[[useTwilioElement]]" restamp="true">
<twilio-element value="{{value}}"></twilio-element>
</template>
</template>
<script>
'use strict'
Polymer({
is: 'polymer-elem-switch',
properties: {
useTwilioElement: {
type: Boolean,
value: true
},
value: {
notify: true
}
},
attached: function() {
window.parentElement = this
}
})
</script>
</dom-module>