|
75 | 75 | <List>
|
76 | 76 | <Item
|
77 | 77 | href="javascript:void(0)"
|
78 |
| - on:click={() => setActive('Gray Kittens')} |
| 78 | + on:click={() => setActiveDismissible('Gray Kittens')} |
79 | 79 | activated={active === 'Gray Kittens'}
|
80 | 80 | >
|
81 | 81 | <Text>Gray Kittens</Text>
|
82 | 82 | </Item>
|
83 | 83 | <Item
|
84 | 84 | href="javascript:void(0)"
|
85 |
| - on:click={() => setActive('A Space Rocket')} |
| 85 | + on:click={() => setActiveDismissible('A Space Rocket')} |
86 | 86 | activated={active === 'A Space Rocket'}
|
87 | 87 | >
|
88 | 88 | <Text>A Space Rocket</Text>
|
89 | 89 | </Item>
|
90 | 90 | <Item
|
91 | 91 | href="javascript:void(0)"
|
92 |
| - on:click={() => setActive('100 Pounds of Gravel')} |
| 92 | + on:click={() => setActiveDismissible('100 Pounds of Gravel')} |
93 | 93 | activated={active === '100 Pounds of Gravel'}
|
94 | 94 | >
|
95 | 95 | <Text>100 Pounds of Gravel</Text>
|
96 | 96 | </Item>
|
97 | 97 | <Item
|
98 | 98 | href="javascript:void(0)"
|
99 |
| - on:click={() => setActive('All of the Shrimp')} |
| 99 | + on:click={() => setActiveDismissible('All of the Shrimp')} |
100 | 100 | activated={active === 'All of the Shrimp'}
|
101 | 101 | >
|
102 | 102 | <Text>All of the Shrimp</Text>
|
103 | 103 | </Item>
|
104 | 104 | <Item
|
105 | 105 | href="javascript:void(0)"
|
106 |
| - on:click={() => setActive('A Planet with a Mall')} |
| 106 | + on:click={() => setActiveDismissible('A Planet with a Mall')} |
107 | 107 | activated={active === 'A Planet with a Mall'}
|
108 | 108 | >
|
109 | 109 | <Text>A Planet with a Mall</Text>
|
|
132 | 132 |
|
133 | 133 | <div class="drawer-container">
|
134 | 134 | <!-- Don't include fixed={false} if this is a page wide drawer.
|
135 |
| - It adds a style for static positioning. --> |
| 135 | + It adds a style for absolute positioning. --> |
136 | 136 | <Drawer
|
137 | 137 | variant="modal"
|
138 | 138 | fixed={false}
|
|
147 | 147 | <List>
|
148 | 148 | <Item
|
149 | 149 | href="javascript:void(0)"
|
150 |
| - on:click={() => setActive2('Inbox')} |
| 150 | + on:click={() => setActiveModal('Inbox')} |
151 | 151 | activated={active2 === 'Inbox'}
|
152 | 152 | >
|
153 | 153 | <Graphic class="material-icons" aria-hidden="true">inbox</Graphic>
|
154 | 154 | <Text>Inbox</Text>
|
155 | 155 | </Item>
|
156 | 156 | <Item
|
157 | 157 | href="javascript:void(0)"
|
158 |
| - on:click={() => setActive2('Star')} |
| 158 | + on:click={() => setActiveModal('Star')} |
159 | 159 | activated={active2 === 'Star'}
|
160 | 160 | >
|
161 | 161 | <Graphic class="material-icons" aria-hidden="true">star</Graphic>
|
162 | 162 | <Text>Star</Text>
|
163 | 163 | </Item>
|
164 | 164 | <Item
|
165 | 165 | href="javascript:void(0)"
|
166 |
| - on:click={() => setActive2('Sent Mail')} |
| 166 | + on:click={() => setActiveModal('Sent Mail')} |
167 | 167 | activated={active2 === 'Sent Mail'}
|
168 | 168 | >
|
169 | 169 | <Graphic class="material-icons" aria-hidden="true">send</Graphic>
|
170 | 170 | <Text>Sent Mail</Text>
|
171 | 171 | </Item>
|
172 | 172 | <Item
|
173 | 173 | href="javascript:void(0)"
|
174 |
| - on:click={() => setActive2('Drafts')} |
| 174 | + on:click={() => setActiveModal('Drafts')} |
175 | 175 | activated={active2 === 'Drafts'}
|
176 | 176 | >
|
177 | 177 | <Graphic class="material-icons" aria-hidden="true">drafts</Graphic
|
|
183 | 183 | <Subheader component={H6}>Labels</Subheader>
|
184 | 184 | <Item
|
185 | 185 | href="javascript:void(0)"
|
186 |
| - on:click={() => setActive2('Family')} |
| 186 | + on:click={() => setActiveModal('Family')} |
187 | 187 | activated={active2 === 'Family'}
|
188 | 188 | >
|
189 | 189 | <Graphic class="material-icons" aria-hidden="true"
|
|
193 | 193 | </Item>
|
194 | 194 | <Item
|
195 | 195 | href="javascript:void(0)"
|
196 |
| - on:click={() => setActive2('Friends')} |
| 196 | + on:click={() => setActiveModal('Friends')} |
197 | 197 | activated={active2 === 'Friends'}
|
198 | 198 | >
|
199 | 199 | <Graphic class="material-icons" aria-hidden="true"
|
|
203 | 203 | </Item>
|
204 | 204 | <Item
|
205 | 205 | href="javascript:void(0)"
|
206 |
| - on:click={() => setActive2('Work')} |
| 206 | + on:click={() => setActiveModal('Work')} |
207 | 207 | activated={active2 === 'Work'}
|
208 | 208 | >
|
209 | 209 | <Graphic class="material-icons" aria-hidden="true"
|
|
254 | 254 | let myDrawer2Open = false;
|
255 | 255 | let active2 = 'Inbox';
|
256 | 256 |
|
257 |
| - function setActive(value) { |
| 257 | + function setActiveDismissible(value) { |
258 | 258 | active = value;
|
259 |
| - myDrawerOpen = false; |
260 | 259 | }
|
261 | 260 |
|
262 |
| - function setActive2(value) { |
| 261 | + function setActiveModal(value) { |
263 | 262 | active2 = value;
|
264 | 263 | myDrawer2Open = false;
|
265 | 264 | }
|
|
0 commit comments