Add a basic sky-scrollable element that scrolls
We still need to polish sky-scrollable, but it basically works. R=esprehn@chromium.org Review URL: https://codereview.chromium.org/875953004
This commit is contained in:
parent
66e6949f46
commit
435b203406
42
examples/example-scrollable.sky
Normal file
42
examples/example-scrollable.sky
Normal file
@ -0,0 +1,42 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
<sky>
|
||||
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="/sky/framework/sky-scrollable.sky" />
|
||||
<import src="data/cities.sky" as="cities" />
|
||||
|
||||
<sky-element name="example-scrollable">
|
||||
<template>
|
||||
<style>
|
||||
sky-scrollable {
|
||||
margin: 20px;
|
||||
height: 400px;
|
||||
border: 2px solid blue;
|
||||
}
|
||||
b {
|
||||
display: inline;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<sky-scrollable>
|
||||
<template repeat="{{ cities }}">
|
||||
<template>
|
||||
<div>{{ name }}</div>
|
||||
</template>
|
||||
</template>
|
||||
</sky-scrollable>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = class extends SkyElement {
|
||||
created() {
|
||||
this.cities = cities;
|
||||
}
|
||||
}.register();
|
||||
</script>
|
||||
</sky-element>
|
||||
|
||||
<example-scrollable />
|
||||
</sky>
|
Loading…
x
Reference in New Issue
Block a user