|
9 | 9 |
|
10 | 10 | <!--
|
11 | 11 |
|
12 |
| -`paper-dropdown-menu` is a control where the user can choose from an array of |
13 |
| -options in a drop-down menu. The currently selected option is displayed in |
14 |
| -the control. |
| 12 | +`paper-dropdown-menu` works together with `paper-dropdown` and `core-menu` to |
| 13 | +implement a drop-down menu. The currently selected item is displayed in the |
| 14 | +control. If no item is selected, the `label` is displayed instead. |
| 15 | +
|
| 16 | +The child element with the class `dropdown` will be used as the drop-down |
| 17 | +menu. It should be a `paper-dropdown` or other overlay element. You should |
| 18 | +also provide a `core-selector` or other selector element, such as `core-menu`, |
| 19 | +in the drop-down. You should apply the class `menu` to the selector element. |
15 | 20 |
|
16 | 21 | Example:
|
17 | 22 |
|
18 |
| - <paper-dropdown-menu selected="Financier" valueattr="label"> |
19 |
| - <paper-item label="Croissant"></paper-item> |
20 |
| - <paper-item label="Donut"></paper-item> |
21 |
| - <paper-item label="Financier"></paper-item> |
22 |
| - <paper-item label="Madeleine"></paper-item> |
| 23 | + <paper-dropdown-menu label="Your favorite pastry"> |
| 24 | + <paper-dropdown class="dropdown"> |
| 25 | + <core-menu class="menu"> |
| 26 | + <paper-item>Croissant</paper-item> |
| 27 | + <paper-item>Donut</paper-item> |
| 28 | + <paper-item>Financier</paper-item> |
| 29 | + <paper-item>Madeleine</paper-item> |
| 30 | + </core-menu> |
| 31 | + </paper-dropdown> |
23 | 32 | </paper-dropdown-menu>
|
24 | 33 |
|
25 |
| -This example renders a drop-down menu with 4 options, with the option |
26 |
| -`Financier` pre-selected. |
27 |
| -
|
28 |
| -Theming |
29 |
| -------- |
30 |
| -
|
31 |
| -Style the drop-down menu with the `paper-dropdown-menu::shadow #menu` selector. |
32 |
| -
|
33 |
| -Example: |
34 |
| -
|
35 |
| - paper-dropdown-menu::shadow #dropdown { |
36 |
| - background-color: #eee; |
37 |
| - border: 1px solid #ccc; |
38 |
| - } |
| 34 | +This example renders a drop-down menu with 4 options. |
39 | 35 |
|
40 | 36 | @group Paper Elements
|
41 | 37 | @element paper-dropdown-menu
|
42 |
| -@status beta |
| 38 | +@extends core-dropdown-base |
| 39 | +@status unstable |
43 | 40 | @homepage github.io
|
44 | 41 | -->
|
45 | 42 |
|
|
0 commit comments