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

Unified Diff: sky/framework/components/button.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks-fn/stocksapp.dart ('k') | sky/framework/components/button_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/button.dart
diff --git a/sky/examples/fn/widgets/button.dart b/sky/framework/components/button.dart
similarity index 65%
rename from sky/examples/fn/widgets/button.dart
rename to sky/framework/components/button.dart
index 17ffa2524bc9f001fe348865d232ee76a69e81f2..159da90c71733248b514d9cc5264c87a02a29149 100644
--- a/sky/examples/fn/widgets/button.dart
+++ b/sky/framework/components/button.dart
@@ -1,8 +1,12 @@
-part of widgets;
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
-class Button extends ButtonBase {
+import '../fn.dart';
+import 'button_base.dart';
- static Style _style = new Style('''
+class Button extends ButtonBase {
+ static final Style _style = new Style('''
transform: translateX(0);
display: inline-flex;
border-radius: 4px;
@@ -13,7 +17,7 @@ class Button extends ButtonBase {
margin: 5px;'''
);
- static Style _highlightStyle = new Style('''
+ static final Style _highlightStyle = new Style('''
transform: translateX(0);
display: inline-flex;
border-radius: 4px;
@@ -31,8 +35,7 @@ class Button extends ButtonBase {
Node build() {
return new Container(
- key: 'Button',
- style: _highlight ? _highlightStyle : _style,
+ style: highlight ? _highlightStyle : _style,
children: [super.build(), content]
);
}
« no previous file with comments | « sky/examples/stocks-fn/stocksapp.dart ('k') | sky/framework/components/button_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698