-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
97 lines (92 loc) · 2.38 KB
/
index.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
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
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
padding: 0;
margin: 0;
}
myuw-drawer[open]::shadow #drawer {
left: 0;
}
myuw-drawer[open]::shadow #shadow {
display: block;
}
.demo__content {
margin: 24px;
padding: 24px;
background: #ddd;
}
</style>
<script src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js"></script>
<script type="module">
import "https://unpkg.com/css-vars-ponyfill@1";
import "https://unpkg.com/@myuw-web-components/myuw-app-styles@^1?module";
import "https://unpkg.com/@myuw-web-components/myuw-app-bar@^1?module";
import "./dist/myuw-drawer.mjs";
cssVars({shadowDOM: true,watch: true});
window.drawerLink = document.getElementById('demo-link');
</script>
<myuw-app-bar
theme-name="MyUW"
theme-url=""
app-name=""
app-url=""
>
<myuw-drawer slot="myuw-navigation" open>
<myuw-drawer-link
id="demo-link"
slot="myuw-drawer-links"
name="MyUW home"
icon="mail"
href="http://google.com"
></myuw-drawer-link>
<myuw-drawer-subheader
slot="myuw-drawer-links"
divider
name="Subheader"
></myuw-drawer-subheader>
<myuw-drawer-link
slot="myuw-drawer-links"
name="Browse apps"
icon="explore"
href="http://google.com"
></myuw-drawer-link>
<myuw-drawer-subheader
slot="myuw-drawer-links"
divider
></myuw-drawer-subheader>
<myuw-drawer-link
slot="myuw-drawer-links"
name="Notifications"
icon="notifications"
href="http://google.com"
></myuw-drawer-link>
<myuw-drawer-link
slot="myuw-drawer-links"
name="About"
icon="info"
href="http://google.com"
></myuw-drawer-link>
<myuw-drawer-subheader
slot="myuw-drawer-links"
divider="true"
name="Subheader"
></myuw-drawer-subheader>
<myuw-drawer-link
slot="myuw-drawer-links"
name="Subnav item"
icon=""
href="#"
></myuw-drawer-link>
</myuw-drawer>
</myuw-app-bar>
<div class="demo__content">
<h1>Change first link attributes</h1>
<form onchange="window.drawerLink.setAttribute(event.target.name, event.target.value)">
<label>Link text: <input type="text" name="name"></label>
<br>
<label>Icon name: <input type="text" name="icon"></label>
<br>
<label>URL: <input type="text" name="href"></label>
</form>
</div>