Chromium Code Reviews| Index: sky/examples/color/color-picker.sky |
| diff --git a/sky/examples/color/color-picker.sky b/sky/examples/color/color-picker.sky |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..662d27bb95537fe44a846d8e933b380cf115dd49 |
| --- /dev/null |
| +++ b/sky/examples/color/color-picker.sky |
| @@ -0,0 +1,32 @@ |
| +<!-- |
| +// 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-box.sky"/> |
| +<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> |
| +<import src="color-wheel.sky" /> |
| +<sky-element name="color-picker"> |
| +<template> |
| + <style> |
| + #color-sample { |
| + height: 100px; |
| + margin-top: 10px; |
| + background-color: {{ inputColor }}; |
| + } |
| + </style> |
| +<sky-box title='Choose a Color'> |
| + <color-wheel color="{{ inputColor }}"/> |
| + <div id="color-sample"></div> |
| +</sky-box> |
|
abarth-chromium
2015/02/02 16:53:55
These should be indented two more spaces (so sky-b
hansmuller1
2015/02/02 17:01:36
Done.
|
| +</template> |
| +<script> |
| +(class extends SkyElement { |
| + created() { |
| + this.inputColor = "#FFFFFF"; |
| + } |
| +}).register(); |
|
abarth-chromium
2015/02/02 16:53:55
Typically we'd write:
module.exports = class exte
hansmuller1
2015/02/02 17:01:36
Done.
|
| +</script> |
| +</sky-element> |
| +</sky> |