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

Unified Diff: sky/examples/stocks-fn/lib/stock_row.dart

Issue 1011023003: Make stocks-fn match the style for the Sky SDK (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more 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/lib/stock_list.dart ('k') | sky/examples/stocks-fn/main.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks-fn/lib/stock_row.dart
diff --git a/sky/examples/stocks-fn/stockrow.dart b/sky/examples/stocks-fn/lib/stock_row.dart
similarity index 69%
rename from sky/examples/stocks-fn/stockrow.dart
rename to sky/examples/stocks-fn/lib/stock_row.dart
index 4d7d688256eec7b019d6fffc7f54b296c5e43f9e..6f75dee5db7baf04a8e5f99f6df6c66bce5b2e34 100644
--- a/sky/examples/stocks-fn/stockrow.dart
+++ b/sky/examples/stocks-fn/lib/stock_row.dart
@@ -1,10 +1,15 @@
-part of stocksapp;
+// 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 StockRow extends Component {
-
- Stock stock;
+import 'package:sky/framework/components/material.dart';
+import 'package:sky/framework/fn.dart';
+import 'package:sky/framework/theme/typography.dart' as typography;
+import 'stock_arrow.dart';
+import 'stock_data.dart';
- static Style _style = new Style('''
+class StockRow extends Component {
+ static final Style _style = new Style('''
transform: translateX(0);
display: flex;
align-items: center;
@@ -15,20 +20,22 @@ class StockRow extends Component {
padding-bottom: 20px;'''
);
- static Style _tickerStyle = new Style('''
+ static final Style _tickerStyle = new Style('''
flex: 1;'''
);
- static Style _lastSaleStyle = new Style('''
+ static final Style _lastSaleStyle = new Style('''
text-align: right;
padding-right: 16px;'''
);
- static Style _changeStyle = new Style('''
+ static final Style _changeStyle = new Style('''
${typography.black.caption};
text-align: right;'''
);
+ Stock stock;
+
StockRow({Stock stock}) : super(key: stock.symbol) {
this.stock = stock;
}
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_list.dart ('k') | sky/examples/stocks-fn/main.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698