flutter/examples/color/color-samples.sky
Hans Muller 5f719fecde Extend the sky color picker example
Displays the last six selected colors.

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/897683002
2015-02-04 09:30:47 -08:00

34 lines
741 B
Plaintext

<!--
// 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.
-->
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
<import src="color-sample.sky" />
<sky-element name="color-samples">
<template>
<style>
:host {
display: flex;
}
color-sample {
height: 100%;
flex: 1;
margin-left: 2px;
margin-right: 2px;
}
</style>
<template repeat="{{ colors }}">
<color-sample color="{{ cssColor }}" />
</template>
</template>
<script>
module.exports = class extends SkyElement {
created() {
this.colors = [];
}
}.register();
</script>
</sky-element>