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

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

Issue 874303003: Move sky-box,-button,-checkbox,-radio out of their directories (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/sky-checkbox.sky ('k') | sky/framework/sky-radio.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-checkbox/sky-checkbox.sky
diff --git a/sky/framework/sky-checkbox/sky-checkbox.sky b/sky/framework/sky-checkbox/sky-checkbox.sky
deleted file mode 100644
index 766f2354f593d6fe330710e5cd616b4972d38814..0000000000000000000000000000000000000000
--- a/sky/framework/sky-checkbox/sky-checkbox.sky
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--
-// Copyright 2014 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/framework/sky-button/sky-button.sky" as="SkyButton" />
-
-<sky-element
- name="sky-checkbox"
- attributes="checked:boolean"
- on-click="handleClick">
-<template>
- <style>
- :host {
- display: flex;
- justify-content: center;
- align-items: center;
- -webkit-user-select: none;
- cursor: pointer;
- width: 30px;
- height: 30px;
- }
- #container {
- border: solid 2px;
- border-color: rgba(90, 90, 90, 0.25);
- width: 10px;
- height: 10px;
- }
- #container.highlight {
- border-radius: 10px;
- background-color: orange;
- border-color: orange;
- }
- #check {
- top: 0px;
- left: 0px;
- }
- #check.checked {
- transform: translate(2px, -15px) rotate(45deg);
- width: 10px;
- height: 20px;
- border-style: solid;
- border-top: none;
- border-left: none;
- border-right-width: 2px;
- border-bottom-width: 2px;
- border-color: #0f9d58;
- }
- </style>
- <div id="container" class="{{ containerStyle }}">
- <div id="check" class="{{ checkStyle }}" />
- </div>
-</template>
-<script>
-module.exports = class extends SkyButton {
- created() {
- super.created();
-
- this.containerStyle = '';
- this.checkStyle = '';
- }
- checkedChanged(oldValue, newValue) {
- this.checkStyle = newValue ? 'checked' : '';
- }
- highlightChanged(oldValue, newValue) {
- this.containerStyle = newValue ? 'highlight' : '';
- }
- handleClick() {
- this.checked = !this.checked;
- }
-}.register();
-</script>
-</sky-element>
« no previous file with comments | « sky/framework/sky-checkbox.sky ('k') | sky/framework/sky-radio.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698