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

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

Issue 971183002: Initial commit of Effen reactive framework experiment for Sky (Closed) Base URL: https://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 Component {
4
5 static Style _style = new Style('''
6 display: flex;
7 align-items: center;
8 height: 48px;
9 -webkit-user-select: none;'''
10 );
11
12 static Style _iconStyle = new Style('''
13 padding: 0px 16px;'''
14 );
15
16 static Style _labelStyle = new Style('''
17 font-family: 'Roboto Medium', 'Helvetica';
18 color: #212121;
19 padding: 0px 16px;
20 flex: 1;'''
21 );
22
23 List<Node> children;
24 String icon;
25
26 MenuItem({ Object key, this.icon, this.children }) : super(key: key) {
27 }
28
29 Node render() {
30 return new Container(
31 style: _style,
32 children: [
33 new Icon(
34 style: _iconStyle,
35 size: 24,
36 type: "${icon}_grey600"
37 ),
38 new Container(
39 style: _labelStyle,
40 children: children
41 )
42 ]
43 );
44 }
45 }
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