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

Side by Side Diff: sky/framework/sky-box.sky

Issue 999873002: Move sky-*.sky into framework/elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: One missing Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « sky/framework/shadow.sky ('k') | sky/framework/sky-button.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 2015 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 <import src="sky-element.sky" />
7
8 <sky-element attributes="title:string">
9 <template>
10 <style>
11 :host {
12 display: flex;
13 flex-direction: column;
14 border-radius: 4px;
15 border: 1px solid gray;
16 margin: 10px;
17 }
18 #title {
19 text-align: center;
20 font-size: 10px;
21 padding: 8px 8px 4px 8px;
22 }
23 #content {
24 padding: 4px 8px 8px 8px;
25 }
26 div {
27 flex: 1;
28 }
29 </style>
30 <div id="title"></div>
31 <div id="content"><content/></div>
32 </template>
33 <script>
34 import "dart:sky";
35
36 @Tagname('sky-box')
37 class SkyBox extends SkyElement {
38 Element _title;
39
40 void shadowRootReady() {
41 _title = shadowRoot.getElementById('title');
42 _title.setChild(new Text(title));
43 }
44
45 void titleChanged(String oldValue, String newValue) {
46 if (_title != null)
47 _title.setChild(new Text(newValue));
48 }
49 }
50
51 _init(script) => register(script, SkyBox);
52 </script>
53 </sky-element>
OLDNEW
« no previous file with comments | « sky/framework/shadow.sky ('k') | sky/framework/sky-button.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698