| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |