Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: sky/examples/color/color-sample.sky

Issue 897683002: Extend the sky color picker example (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/color/color-picker.sky ('k') | sky/examples/color/color-samples.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/color/color-sample.sky
diff --git a/sky/examples/appish.sky b/sky/examples/color/color-sample.sky
similarity index 54%
copy from sky/examples/appish.sky
copy to sky/examples/color/color-sample.sky
index e2c1d777747e2304d1f3b0cf3880a16080fd7c24..ef7cfed39af8d6efcc00c36ea21dbdad3d18d80d 100644
--- a/sky/examples/appish.sky
+++ b/sky/examples/color/color-sample.sky
@@ -1,26 +1,23 @@
-#!mojo mojo:sky_viewer
<!--
// 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="example-scaffold.sky" />
-<sky-element name="example-app">
+<sky-element name="color-sample" attributes="color:string">
<template>
- <example-scaffold>
- <div class="title">Awesome app</div>
- <div class="menu">This is a menu</div>
- <div class="body">This is an awesome app.</div>
- </example-scrollable>
+ <style>
+ :host {
+ background-color: {{ color }};
+ }
+ </style>
</template>
<script>
module.exports = class extends SkyElement {
+ created() {
+ this.color = "blue"; // "#FFFFFF";
+ }
}.register();
</script>
</sky-element>
-
-<example-app />
-</sky>
« no previous file with comments | « sky/examples/color/color-picker.sky ('k') | sky/examples/color/color-samples.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698