Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * @fileoverview | |
| 7 * 'cr-settings-drawer' holds the user card and navigation menu for settings | |
| 8 * pages. | |
| 9 * | |
| 10 * Example: | |
| 11 * | |
| 12 * <core-drawer-panel> | |
| 13 * <cr-settings-drawer drawer selectedIndex="{{index}}" pages="{{pages}}"> | |
| 14 * </cr-settings-drawer> | |
| 15 * <cr-settings-main main currentPageIndex="{{index}}" pages="{{pages}}"> | |
| 16 * </cr-settings-main> | |
| 17 * </core-drawer-panel> | |
| 18 * | |
| 19 * @group Chrome Settings Elements | |
| 20 * @element cr-settings-drawer | |
| 21 */ | |
| 22 Polymer('cr-settings-drawer', { | |
| 23 publish: { | |
| 24 /** | |
| 25 * Pages to include in the navigation. | |
| 26 * | |
| 27 * @attribute pages | |
| 28 * @type Array<!CrSettingsPage> | |
| 29 * @default [] | |
| 30 */ | |
| 31 pages: [], | |
|
Jeremy Klein
2015/03/07 23:55:13
This should be initialized in the created callback
| |
| 32 | |
| 33 /** | |
| 34 * Index of the currently selected page. | |
| 35 * | |
| 36 * @attribute selectedIndex | |
| 37 * @type number | |
| 38 * default 0 | |
| 39 */ | |
| 40 selectedIndex: 0, | |
| 41 }, | |
| 42 | |
| 43 /** | |
| 44 * @type {Object} | |
| 45 * TODO(michaelpg): Create custom element and data source for user card. | |
| 46 */ | |
| 47 user: { | |
| 48 name: 'Chrome User', | |
| 49 email: 'user@example.com', | |
| 50 }, | |
| 51 }); | |
| OLD | NEW |