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

Side by Side Diff: sky/examples/fn/widgets/menuitem.dart

Issue 993033003: Move example fn widgets into sky/framework/components (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
« no previous file with comments | « sky/examples/fn/widgets/menudivider.dart ('k') | sky/examples/fn/widgets/radio.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 part of widgets;
2
3 class MenuItem extends ButtonBase {
4
5 static Style _style = new Style('''
6 transform: translateX(0);
7 display: flex;
8 align-items: center;
9 height: 48px;
10 -webkit-user-select: none;'''
11 );
12
13 static Style _highlightStyle = new Style('''
14 transform: translateX(0);
15 display: flex;
16 align-items: center;
17 height: 48px;
18 background: rgba(153, 153, 153, 0.4);
19 -webkit-user-select: none;'''
20 );
21
22 static Style _iconStyle = new Style('''
23 padding: 0px 16px;'''
24 );
25
26 static Style _labelStyle = new Style('''
27 font-family: 'Roboto Medium', 'Helvetica';
28 color: #212121;
29 padding: 0px 16px;
30 flex: 1;'''
31 );
32
33 List<Node> children;
34 String icon;
35
36 MenuItem({ Object key, this.icon, this.children }) : super(key: key);
37
38 Node build() {
39 return new Container(
40 style: _highlight ? _highlightStyle : _style,
41 children: [
42 super.build(),
43 new Icon(
44 style: _iconStyle,
45 size: 24,
46 type: "${icon}_grey600"
47 ),
48 new Container(
49 style: _labelStyle,
50 children: children
51 )
52 ]
53 );
54 }
55 }
OLDNEW
« no previous file with comments | « sky/examples/fn/widgets/menudivider.dart ('k') | sky/examples/fn/widgets/radio.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698