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

Unified Diff: sky/examples/fn/widgets/drawerheader.dart

Issue 971183002: Initial commit of Effen reactive framework experiment for Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/fn/widgets/drawer.dart ('k') | sky/examples/fn/widgets/fixedheightscrollable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/fn/widgets/drawerheader.dart
diff --git a/sky/examples/fn/widgets/drawerheader.dart b/sky/examples/fn/widgets/drawerheader.dart
new file mode 100644
index 0000000000000000000000000000000000000000..69810a43a9e93f9f9b216480b10a68b9c9e0e576
--- /dev/null
+++ b/sky/examples/fn/widgets/drawerheader.dart
@@ -0,0 +1,46 @@
+part of widgets;
+
+class DrawerHeader extends Component {
+
+ static Style _style = new Style('''
+ display: flex;
+ flex-direction: column;
+ height: 140px;
+ -webkit-user-select: none;
+ background-color: #E3ECF5;
+ border-bottom: 1px solid #D1D9E1;
+ padding-bottom: 7px;
+ margin-bottom: 8px;'''
+ );
+
+ static Style _spacerStyle = new Style('''
+ flex: 1'''
+ );
+
+ static Style _labelStyle = new Style('''
+ padding: 0 16px;
+ font-family: 'Roboto Medium', 'Helvetica';
+ color: #212121;'''
+ );
+
+ List<Node> children;
+
+ DrawerHeader({ Object key, this.children }) : super(key: key);
+
+ Node render() {
+ return new Container(
+ style: _style,
+ children: [
+ new Container(
+ key: 'Spacer',
+ style: _spacerStyle
+ ),
+ new Container(
+ key: 'Label',
+ style: _labelStyle,
+ children: children
+ )
+ ]
+ );
+ }
+}
« no previous file with comments | « sky/examples/fn/widgets/drawer.dart ('k') | sky/examples/fn/widgets/fixedheightscrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698