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

Unified Diff: sky/framework/components/button.dart

Issue 1003553002: Update Button to be made of Material (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
Index: sky/framework/components/button.dart
diff --git a/sky/framework/components/button.dart b/sky/framework/components/button.dart
index f85380c841a2a6df56e747cc6672ec5aa3a6e3b8..b66139d15ac5e490cb2978308c247917ce1ae699 100644
--- a/sky/framework/components/button.dart
+++ b/sky/framework/components/button.dart
@@ -3,41 +3,33 @@
// found in the LICENSE file.
import '../fn.dart';
-import 'button_base.dart';
+import '../theme/shadows.dart';
import 'material.dart';
-class Button extends ButtonBase {
+class Button extends Component {
static final Style _style = new Style('''
- transform: translateX(0);
display: inline-flex;
- border-radius: 4px;
- justify-content: center;
- align-items: center;
- border: 1px solid blue;
- -webkit-user-select: none;
- margin: 5px;'''
- );
-
- static final Style _highlightStyle = new Style('''
transform: translateX(0);
- display: inline-flex;
- border-radius: 4px;
+ -webkit-user-select: none;
justify-content: center;
align-items: center;
- border: 1px solid blue;
- -webkit-user-select: none;
- margin: 5px;
- background-color: orange;'''
+ height: 36px;
+ min-width: 64px;
+ padding: 0 8px;
+ margin: 4px;
+ border-radius: 2px;'''
);
Node content;
+ int level;
- Button({ Object key, this.content }) : super(key: key);
+ Button({ Object key, this.content, this.level }) : super(key: key);
Node build() {
return new Material(
- style: highlight ? _highlightStyle : _style,
- children: [content]
+ styles: [_style],
+ children: [content],
+ level: level
);
}
}

Powered by Google App Engine
This is Rietveld 408576698