OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. |
| 5 --> |
| 6 <sky> |
| 7 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> |
| 8 <import src="/sky/framework/sky-scrollable.sky" /> |
| 9 <import src="data/cities.sky" as="cities" /> |
| 10 |
| 11 <sky-element name="example-scrollable"> |
| 12 <template> |
| 13 <style> |
| 14 sky-scrollable { |
| 15 margin: 20px; |
| 16 height: 400px; |
| 17 border: 2px solid blue; |
| 18 } |
| 19 b { |
| 20 display: inline; |
| 21 font-weight: bold; |
| 22 } |
| 23 </style> |
| 24 <sky-scrollable> |
| 25 <template repeat="{{ cities }}"> |
| 26 <template> |
| 27 <div>{{ name }}</div> |
| 28 </template> |
| 29 </template> |
| 30 </sky-scrollable> |
| 31 </template> |
| 32 <script> |
| 33 module.exports = class extends SkyElement { |
| 34 created() { |
| 35 this.cities = cities; |
| 36 } |
| 37 }.register(); |
| 38 </script> |
| 39 </sky-element> |
| 40 |
| 41 <example-scrollable /> |
| 42 </sky> |
OLD | NEW |