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

Unified Diff: sky/framework/elements/sky-checkbox.sky

Issue 1132063007: Rationalize Dart mojo and sky package structure (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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/framework/elements/sky-button.sky ('k') | sky/framework/elements/sky-drawer.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/elements/sky-checkbox.sky
diff --git a/sky/framework/elements/sky-checkbox.sky b/sky/framework/elements/sky-checkbox.sky
deleted file mode 100644
index 4d52d95494f610c50cc74db874432162a8000de1..0000000000000000000000000000000000000000
--- a/sky/framework/elements/sky-checkbox.sky
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
-// 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-element.sky" />
-<import src="sky-icon.sky" />
-
-<sky-element attributes="checked:boolean">
-<template>
- <style>
- :host {
- display: inline-flex;
- -webkit-user-select: none;
- margin: 8px 16px;
- }
- </style>
- <sky-icon size="18" />
-</template>
-<script>
-import "dart:sky";
-
-const String _kOnIcon = 'toggle/check_box_black';
-const String _kOffIcon = 'toggle/check_box_outline_blank_black';
-
-@Tagname('sky-checkbox')
-class SkyCheckbox extends SkyElement {
- SkyIcon _icon;
-
- SkyCheckbox() {
- addEventListener('click', _handleClick);
- }
-
- void shadowRootReady() {
- _icon = shadowRoot.querySelector('sky-icon');
- _icon.type = checked ? _kOnIcon : _kOffIcon;
- }
-
- void checkedChanged(bool oldValue, bool newValue) {
- if (_icon != null)
- _icon.type = newValue ? _kOnIcon : _kOffIcon;
- }
-
- void _handleClick(_) {
- checked = !checked;
- }
-}
-
-_init(script) => register(script, SkyCheckbox);
-</script>
-</sky-element>
« no previous file with comments | « sky/framework/elements/sky-button.sky ('k') | sky/framework/elements/sky-drawer.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698