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 selectedId="{{selectedId}}" |
| 14 * pages="{{pages}}"> |
| 15 * </cr-settings-drawer> |
| 16 * <cr-settings-main main selectedId="{{selectedId}}" pages="{{pages}}"> |
| 17 * </cr-settings-main> |
| 18 * </core-drawer-panel> |
| 19 * |
| 20 * @group Chrome Settings Elements |
| 21 * @element cr-settings-drawer |
| 22 */ |
| 23 Polymer('cr-settings-drawer', { |
| 24 publish: { |
| 25 /** |
| 26 * Pages to include in the navigation. |
| 27 * |
| 28 * @attribute pages |
| 29 * @type Array<!Object> |
| 30 * @default null |
| 31 */ |
| 32 pages: null, |
| 33 |
| 34 /** |
| 35 * ID of the currently selected page. |
| 36 * |
| 37 * @attribute selectedId |
| 38 * @type string |
| 39 * default '' |
| 40 */ |
| 41 selectedId: '', |
| 42 }, |
| 43 |
| 44 /** @override */ |
| 45 created: function() { |
| 46 this.pages = []; |
| 47 }, |
| 48 |
| 49 /** |
| 50 * @type {Object} |
| 51 * TODO(michaelpg): Create custom element and data source for user card. |
| 52 */ |
| 53 user: { |
| 54 name: 'Chrome User', |
| 55 email: 'user@example.com', |
| 56 iconUrl: 'chrome://theme/IDR_PROFILE_AVATAR_23@1x', |
| 57 }, |
| 58 }); |
OLD | NEW |