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

Side by Side Diff: ui/webui/resources/cr_elements/cr_toggle_button/cr-toggle-button.js

Issue 902053003: Add cr-toggle-button to Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change cr-events api 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 unified diff | Download patch
OLDNEW
(Empty)
1 /* Copyright 2015 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
4
5 /**
6 * @fileoverview
7 * `cr-toggle-button` provides a switch the user can toggle on or off by
8 * tapping or by dragging. Wraps a `paper-toggle-button`.
9 *
10 * Example:
11 *
12 * <cr-toggle-button></cr-toggle-button>
13 *
14 * @element cr-toggle-button
15 */
16 Polymer({
17 publish: {
18 /**
19 * Gets or sets the state. `true` is checked and `false` is unchecked.
20 *
21 * @attribute checked
22 * @type boolean
23 * @default false
24 */
25 checked: {
26 value: false,
27 reflect: true,
28 },
29
30 /**
James Hawkins 2015/02/09 22:24:35 nit: Double blank line above this JSDoc.
michaelpg 2015/02/09 23:08:31 Done.
31 * If true, the toggle button is disabled.
32 *
33 * @attribute disabled
34 * @type boolean
35 * @default false
36 */
37 disabled: {
38 value: false,
39 reflect: true,
40 },
41 },
42
43 ready: function() {
44 this.$.events.forward(this.$.button, ['change']);
45 },
46 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698