blob: 46ede2dd2bc2f0eb19d69a5c379ae7cda14bbf11 [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-subpage' shows a subpage beneath a subheader. The header contains
* the subpage title, a search field and a back icon.
*/
Polymer({
is: 'settings-subpage',
behaviors: [
// TODO(michaelpg): phase out NeonAnimatableBehavior.
Polymer.NeonAnimatableBehavior,
Polymer.IronResizableBehavior,
],
properties: {
pageTitle: String,
learnMoreUrl: String,
/** Setting a |searchLabel| will enable search. */
searchLabel: String,
searchTerm: {
type: String,
notify: true,
value: '',
},
/** If true shows an active spinner at the end of the subpage header. */
showSpinner: {
type: Boolean,
value: false,
},
/**
* Indicates which element triggers this subpage. Used by the searching
* algorithm to show search bubbles. It is |null| for subpages that are
* skipped during searching.
* @type {?HTMLElement}
*/
associatedControl: {
type: Object,
value: null,
},
},
/** @private */
onTapBack_: function() {
settings.navigateToPreviousRoute();
},
/** @private */
onSearchChanged_: function(e) {
this.searchTerm = e.detail;
},
});