blob: 1352bccfeadf21ee4242a8d4dfe60e9c1e330d12 [file] [log] [blame]
// 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_())
return;
this.checked = !this.checked;
this.notifyChangedByUserInteraction();
},
});