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

Side by Side Diff: sky/examples/widgets/index.sky

Issue 809233002: Add super-basic sky widgets. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix typos Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/framework/sky-box/sky-box.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 -->
6 <sky>
7 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
8 <import src="/sky/framework/sky-button/sky-button.sky" as="SkyButton" />
9 <import src="/sky/framework/sky-box/sky-box.sky" as="SkyBox" />
10 <import src="/sky/framework/sky-checkbox/sky-checkbox.sky" as="SkyCheckbox" />
11 <import src="/sky/framework/sky-radio/sky-radio.sky" as="SkyRadio" />
12 <sky-element name="widget-root">
13 <template>
14 <style>
15 div { display: paragraph; }
16 </style>
17
18 <sky-box title='Buttons'>
19 <sky-button id='button'>Button</sky-button>
20 <div>highlight: {{ myButton.highlight }}</div>
21 </sky-box>
22
23 <sky-box title='Checkboxes'>
24 <div><sky-checkbox id='checkbox' />Checkbox</div>
25 <div>highlight: {{ myCheckbox.highlight }}</div>
26 <div>checked: {{ myCheckbox.checked }}</div>
27
28 <div><sky-checkbox id='checkbox' checked='true'/>Checkbox, default checked.< /div>
29 </sky-box>
30
31 <sky-box title='Radios'>
32 <sky-box title='Group One'>
33 <div><sky-radio group='foo'/>one</div>
34 <div><sky-radio group='foo' selected='true' />two</div>
35 <div><sky-radio group='foo'/>three</div>
36 </sky-box>
37 <sky-box title='Group Two'>
38 <div><sky-radio group='bar'/>A</div>
39 <div><sky-radio group='bar'/>B</div>
40 <div><sky-radio group='bar' selected='true' />C</div>
41 </sky-box>
42 </sky-box>
43
44 </template>
45 <script>
46 module.exports = class extends SkyElement {
47 attached() {
48 this.myButton = this.shadowRoot.getElementById('button');
49 this.myCheckbox = this.shadowRoot.getElementById('checkbox');
50 }
51 }.register();
52 </script>
53 </sky-element>
54
55 <widget-root />
56 </sky>
OLDNEW
« no previous file with comments | « no previous file | sky/framework/sky-box/sky-box.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698