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

Side by Side Diff: sky/framework/components/button.dart

Issue 983903003: Re-work MaterialComponent (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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/stocks-fn/stockrow.dart ('k') | sky/framework/components/button_base.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../fn.dart'; 5 import '../fn.dart';
6 import 'button_base.dart'; 6 import 'button_base.dart';
7 import 'material.dart';
7 8
8 class Button extends ButtonBase { 9 class Button extends ButtonBase {
9 static final Style _style = new Style(''' 10 static final Style _style = new Style('''
10 transform: translateX(0); 11 transform: translateX(0);
11 display: inline-flex; 12 display: inline-flex;
12 border-radius: 4px; 13 border-radius: 4px;
13 justify-content: center; 14 justify-content: center;
14 align-items: center; 15 align-items: center;
15 border: 1px solid blue; 16 border: 1px solid blue;
16 -webkit-user-select: none; 17 -webkit-user-select: none;
(...skipping 10 matching lines...) Expand all
27 -webkit-user-select: none; 28 -webkit-user-select: none;
28 margin: 5px; 29 margin: 5px;
29 background-color: orange;''' 30 background-color: orange;'''
30 ); 31 );
31 32
32 Node content; 33 Node content;
33 34
34 Button({ Object key, this.content }) : super(key: key); 35 Button({ Object key, this.content }) : super(key: key);
35 36
36 Node build() { 37 Node build() {
37 return new Container( 38 return new Material(
38 style: highlight ? _highlightStyle : _style, 39 style: highlight ? _highlightStyle : _style,
39 children: [super.build(), content] 40 children: [content]
40 ); 41 );
41 } 42 }
42 } 43 }
OLDNEW
« no previous file with comments | « sky/examples/stocks-fn/stockrow.dart ('k') | sky/framework/components/button_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698