Chromium Code Reviews| Index: ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js |
| diff --git a/ui/webui/resources/cr_elements/cr_toggle_button/cr_toggle_button.js b/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js |
| similarity index 56% |
| copy from ui/webui/resources/cr_elements/cr_toggle_button/cr_toggle_button.js |
| copy to ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js |
| index c077c010aa0866013e613a1ca11f399f16e1f8c7..66ef6c12ed41e0f3d557659b53f09f407f5ea78d 100644 |
| --- a/ui/webui/resources/cr_elements/cr_toggle_button/cr_toggle_button.js |
| +++ b/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js |
| @@ -4,14 +4,17 @@ |
| /** |
| * @fileoverview |
| - * `cr-toggle-button` provides a switch the user can toggle on or off by |
| - * tapping or by dragging. Wraps a `paper-toggle-button`. |
| + * `paper-checkbox` is a button that can be either checked or unchecked. User |
|
michaelpg
2015/02/11 02:08:10
cr-checkbox, cr-toggle-button, etc
Oren Blasberg
2015/02/11 20:12:42
Done.
|
| + * can tap the checkbox to check or uncheck it. Usually you use checkboxes |
| + * to allow user to select multiple options from a set. If you have a single |
| + * ON/OFF option, avoid using a single checkbox and use `paper-toggle-button` |
| + * instead. |
| * |
| * Example: |
| + * <paper-checkbox></paper-checkbox> |
|
Jeremy Klein
2015/02/11 01:55:36
cr-checkbox
Oren Blasberg
2015/02/11 20:12:42
Done.
|
| + * <paper-checkbox checked></paper-checkbox> |
| * |
| - * <cr-toggle-button></cr-toggle-button> |
| - * |
| - * @element cr-toggle-button |
| + * @element cr-checkbox |
| */ |
| Polymer({ |
|
Jeremy Klein
2015/02/11 01:55:36
Should we also expose the toggle function?
Oren Blasberg
2015/02/11 20:12:42
Done.
|
| publish: { |
| @@ -29,6 +32,16 @@ Polymer({ |
| /** |
| + * The label for the checkbox. |
| + * |
| + * @attribute label |
| + * @type string |
| + * @default '' |
| + */ |
| + label: '', |
| + |
| + |
| + /** |
| * If true, the toggle button is disabled. |
| * |
| * @attribute disabled |