OLD | NEW |
1 <!-- | 1 <!-- |
2 @license | 2 @license |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
9 --><html><head><link rel="import" href="../polymer/polymer.html"> | 9 --><html><head><link rel="import" href="../polymer/polymer.html"> |
10 <link rel="import" href="../iron-behaviors/iron-control-state.html"> | 10 <link rel="import" href="../iron-behaviors/iron-control-state.html"> |
11 <link rel="import" href="../iron-behaviors/iron-button-state.html"> | 11 <link rel="import" href="../iron-behaviors/iron-button-state.html"> |
12 <link rel="import" href="../paper-styles/paper-styles.html"> | 12 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> |
| 13 <link rel="import" href="../paper-styles/typography.html"> |
| 14 <link rel="import" href="paper-item-behavior.html"> |
13 <link rel="import" href="paper-item-shared-styles.html"> | 15 <link rel="import" href="paper-item-shared-styles.html"> |
14 | 16 |
15 <!-- | 17 <!-- |
16 `<paper-icon-item>` is a convenience element to make an item with icon. It is a
non interactive list | 18 `<paper-icon-item>` is a convenience element to make an item with icon. It is an
interactive list |
17 item with a fixed-width icon area, according to Material Design. This is useful
if the icons are of | 19 item with a fixed-width icon area, according to Material Design. This is useful
if the icons are of |
18 varying widths, but you want the item bodies to line up. Use this like a `<paper
-item>`. The child | 20 varying widths, but you want the item bodies to line up. Use this like a `<paper
-item>`. The child |
19 node with the attribute `item-icon` is placed in the icon area. | 21 node with the attribute `item-icon` is placed in the icon area. |
20 | 22 |
21 <paper-icon-item> | 23 <paper-icon-item> |
22 <iron-icon icon="favorite" item-icon></iron-icon> | 24 <iron-icon icon="favorite" item-icon></iron-icon> |
23 Favorite | 25 Favorite |
24 </paper-icon-item> | 26 </paper-icon-item> |
25 <paper-icon-item> | 27 <paper-icon-item> |
26 <div class="avatar" item-icon></div> | 28 <div class="avatar" item-icon></div> |
27 Avatar | 29 Avatar |
28 </paper-icon-item> | 30 </paper-icon-item> |
29 | 31 |
30 ### Styling | 32 ### Styling |
31 | 33 |
32 The following custom properties and mixins are available for styling: | 34 The following custom properties and mixins are available for styling: |
33 | 35 |
34 Custom property | Description |
Default | 36 Custom property | Description |
Default |
35 ------------------------------|------------------------------------------------|
---------- | 37 ------------------------------|------------------------------------------------|
---------- |
36 `--paper-item-icon-width` | Width of the icon area |
`56px` | 38 `--paper-item-icon-width` | Width of the icon area |
`56px` |
37 `--paper-icon-item` | Mixin applied to the item |
`{}` | 39 `--paper-icon-item` | Mixin applied to the item |
`{}` |
38 `--paper-item-selected-weight`| The font weight of a selected item |
`bold` | 40 `--paper-item-selected-weight`| The font weight of a selected item |
`bold` |
39 `--paper-item-selected` | Mixin applied to selected paper-items
| `{}` | 41 `--paper-item-selected` | Mixin applied to selected paper-items
| `{}` |
40 `--paper-item-disabled-color` | The color for disabled paper-items |
`--disabled-text-color` | 42 `--paper-item-disabled-color` | The color for disabled paper-items |
`--disabled-text-color` |
41 `--paper-item-disabled` | Mixin applied to disabled paper-items | `
{}` | 43 `--paper-item-disabled` | Mixin applied to disabled paper-items | `
{}` |
42 `--paper-item-focused` | Mixin applied to focused paper-items | `
{}` | 44 `--paper-item-focused` | Mixin applied to focused paper-items | `
{}` |
43 `--paper-item-focused-before` | Mixin applied to :before focused paper-items | `
{}` | 45 `--paper-item-focused-before` | Mixin applied to :before focused paper-items | `
{}` |
44 | |
45 --> | 46 --> |
46 | 47 |
47 </head><body><dom-module id="paper-icon-item"> | 48 </head><body><dom-module id="paper-icon-item"> |
48 <template> | 49 <template> |
49 <style include="paper-item-shared-styles"></style> | 50 <style include="paper-item-shared-styles"></style> |
50 <style> | 51 <style> |
51 :host { | 52 :host { |
52 @apply(--layout-horizontal); | 53 @apply(--layout-horizontal); |
53 @apply(--layout-center); | 54 @apply(--layout-center); |
54 @apply(--paper-font-subhead); | 55 @apply(--paper-font-subhead); |
55 | 56 |
56 @apply(--paper-item); | 57 @apply(--paper-item); |
57 @apply(--paper-icon-item); | 58 @apply(--paper-icon-item); |
58 } | 59 } |
59 | 60 |
60 .content-icon { | 61 .content-icon { |
61 width: var(--paper-item-icon-width, 56px); | 62 width: var(--paper-item-icon-width, 56px); |
| 63 @apply(--layout-horizontal); |
| 64 @apply(--layout-center); |
62 } | 65 } |
63 </style> | 66 </style> |
64 | 67 |
65 <div id="contentIcon" class="content-icon layout horizontal center"> | 68 <div id="contentIcon" class="content-icon"> |
66 <content select="[item-icon]"></content> | 69 <content select="[item-icon]"></content> |
67 </div> | 70 </div> |
68 <content></content> | 71 <content></content> |
69 </template> | 72 </template> |
70 | 73 |
71 </dom-module> | 74 </dom-module> |
72 <script src="paper-icon-item-extracted.js"></script></body></html> | 75 <script src="paper-icon-item-extracted.js"></script></body></html> |
OLD | NEW |