OLD | NEW |
1 /** | 1 /** |
2 Use `Polymer.PaperDialogBehavior` and `paper-dialog-common.css` to implement a M
aterial Design | 2 Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to imple
ment a Material Design |
3 dialog. | 3 dialog. |
4 | 4 |
5 For example, if `<paper-dialog-impl>` implements this behavior: | 5 For example, if `<paper-dialog-impl>` implements this behavior: |
6 | 6 |
7 <paper-dialog-impl> | 7 <paper-dialog-impl> |
8 <h2>Header</h2> | 8 <h2>Header</h2> |
9 <div>Dialog body</div> | 9 <div>Dialog body</div> |
10 <div class="buttons"> | 10 <div class="buttons"> |
11 <paper-button dialog-dismiss>Cancel</paper-button> | 11 <paper-button dialog-dismiss>Cancel</paper-button> |
12 <paper-button dialog-confirm>Accept</paper-button> | 12 <paper-button dialog-confirm>Accept</paper-button> |
13 </div> | 13 </div> |
14 </paper-dialog-impl> | 14 </paper-dialog-impl> |
15 | 15 |
16 `paper-dialog-common.css` provide styles for a header, content area, and an acti
on area for buttons. | 16 `paper-dialog-shared-styles.html` provide styles for a header, content area, and
an action area for buttons. |
17 Use the `<h2>` tag for the header and the `buttons` class for the action area. Y
ou can use the | 17 Use the `<h2>` tag for the header and the `buttons` class for the action area. Y
ou can use the |
18 `paper-dialog-scrollable` element (in its own repository) if you need a scrollin
g content area. | 18 `paper-dialog-scrollable` element (in its own repository) if you need a scrollin
g content area. |
19 | 19 |
20 Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls
to close the | 20 Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls
to close the |
21 dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReas
on` will update | 21 dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReas
on` will update |
22 to include `confirmed: true`. | 22 to include `confirmed: true`. |
23 | 23 |
24 ### Styling | 24 ### Styling |
25 | 25 |
26 The following custom properties and mixins are available for styling. | 26 The following custom properties and mixins are available for styling. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } else { | 212 } else { |
213 this._focusNode.focus(); | 213 this._focusNode.focus(); |
214 } | 214 } |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 }; | 218 }; |
219 | 219 |
220 /** @polymerBehavior */ | 220 /** @polymerBehavior */ |
221 Polymer.PaperDialogBehavior = [Polymer.IronOverlayBehavior, Polymer.PaperDialo
gBehaviorImpl]; | 221 Polymer.PaperDialogBehavior = [Polymer.IronOverlayBehavior, Polymer.PaperDialo
gBehaviorImpl]; |
OLD | NEW |