mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Displays the last six selected colors. BUG= R=abarth@chromium.org Review URL: https://codereview.chromium.org/897683002
34 lines
741 B
Plaintext
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>
|