| 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 '../theme/colors.dart'; | 6 import '../theme/colors.dart'; |
| 7 import '../theme/view-configuration.dart'; | 7 import '../theme/view-configuration.dart'; |
| 8 | 8 |
| 9 class DrawerHeader extends Component { | 9 class DrawerHeader extends Component { |
| 10 static final Style _style = new Style(''' | 10 static final Style _style = new Style(''' |
| 11 display: flex; | 11 display: flex; |
| 12 flex-direction: column; | 12 flex-direction: column; |
| 13 height: ${140 + kStatusBarHeight}px; | 13 height: ${140 + kStatusBarHeight}px; |
| 14 -webkit-user-select: none; | 14 -webkit-user-select: none; |
| 15 background-color: ${BlueGrey[50]}; | 15 background-color: ${BlueGrey[50]}; |
| 16 border-bottom: 1px solid #D1D9E1; | 16 border-bottom: 1px solid #D1D9E1; |
| 17 padding-bottom: 7px; | 17 padding-bottom: 7px; |
| 18 margin-bottom: 8px;''' | 18 margin-bottom: 8px;''' |
| 19 ); | 19 ); |
| 20 | 20 |
| 21 static final Style _spacerStyle = new Style(''' | 21 static final Style _spacerStyle = new Style(''' |
| 22 flex: 1''' | 22 flex: 1''' |
| 23 ); | 23 ); |
| 24 | 24 |
| 25 static final Style _labelStyle = new Style(''' | 25 static final Style _labelStyle = new Style(''' |
| 26 padding: 0 16px;''' | 26 padding: 0 16px;''' |
| 27 ); | 27 ); |
| 28 | 28 |
| 29 List<Node> children; | 29 List<UINode> children; |
| 30 | 30 |
| 31 DrawerHeader({ Object key, this.children }) : super(key: key); | 31 DrawerHeader({ Object key, this.children }) : super(key: key); |
| 32 | 32 |
| 33 Node build() { | 33 UINode build() { |
| 34 return new Container( | 34 return new Container( |
| 35 style: _style, | 35 style: _style, |
| 36 children: [ | 36 children: [ |
| 37 new Container( | 37 new Container( |
| 38 key: 'Spacer', | 38 key: 'Spacer', |
| 39 style: _spacerStyle | 39 style: _spacerStyle |
| 40 ), | 40 ), |
| 41 new Container( | 41 new Container( |
| 42 key: 'Label', | 42 key: 'Label', |
| 43 style: _labelStyle, | 43 style: _labelStyle, |
| 44 children: children | 44 children: children |
| 45 ) | 45 ) |
| 46 ] | 46 ] |
| 47 ); | 47 ); |
| 48 } | 48 } |
| 49 } | 49 } |
| OLD | NEW |