Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: sky/framework/sky-menu-item.sky

Issue 954023002: Implement quantum ink splashes (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="sky-element.sky" /> 6 <import src="sky-element.sky" />
7 <import src="sky-icon.sky" /> 7 <import src="sky-icon.sky" />
8 8
9 <sky-element attributes="icon:string"> 9 <sky-element attributes="icon:string">
10 <template> 10 <template>
(...skipping 21 matching lines...) Expand all
32 </template> 32 </template>
33 <script> 33 <script>
34 import "dart:sky"; 34 import "dart:sky";
35 35
36 @Tagname('sky-menu-item') 36 @Tagname('sky-menu-item')
37 class SkyMenuItem extends SkyElement { 37 class SkyMenuItem extends SkyElement {
38 SkyIcon _icon; 38 SkyIcon _icon;
39 Element _label; 39 Element _label;
40 40
41 void shadowRootReady() { 41 void shadowRootReady() {
42 super.shadowRootReady();
eseidel 2015/02/24 23:39:12 This will still work, correct?
43
42 _icon = shadowRoot.querySelector('sky-icon'); 44 _icon = shadowRoot.querySelector('sky-icon');
43 _icon.type = "${icon}_grey600"; 45 _icon.type = "${icon}_grey600";
44 } 46 }
45 47
46 void iconChanged(String oldValue, String newValue) { 48 void iconChanged(String oldValue, String newValue) {
47 if (_icon != null) 49 if (_icon != null)
48 _icon.type = "${newValue}_grey600"; 50 _icon.type = "${newValue}_grey600";
49 } 51 }
50 } 52 }
51 53
52 _init(script) => register(script, SkyMenuItem); 54 _init(script) => register(script, SkyMenuItem);
53 </script> 55 </script>
54 </sky-element> 56 </sky-element>
OLDNEW
« sky/framework/material-element.sky ('K') | « sky/framework/sky-ink-splash.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698