| // Copyright 2016 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. |
| |
| /** |
| * @fileoverview |
| * `settings-toggle-button` is a toggle that controls a supplied preference. |
| */ |
| Polymer({ |
| is: 'settings-toggle-button', |
| |
| properties: { |
| elideLabel: { |
| type: Boolean, |
| reflectToAttribute: true, |
| }, |
| }, |
| |
| behaviors: [SettingsBooleanControlBehavior], |
| |
| /** @private */ |
| onLabelWrapperTap_: function() { |
| if (!this.controlDisabled_()) |
| this.checked = !this.checked; |
| }, |
| }); |