blob: fcfa247e202cd4ecca207b6f3310ec22cf511d36 [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_())
this.checked = !this.checked;
},
});