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