• Home
Name Date Size #Lines LOC

..--

demo/03-May-2024-143102

test/03-May-2024-512396

.bower.jsonD03-May-20241.8 KiB4949

.gitignoreD03-May-202417 21

.travis.ymlD03-May-2024789 2423

CONTRIBUTING.mdD03-May-20243.4 KiB7839

README.mdD03-May-20241.9 KiB5527

bower.jsonD03-May-20241.5 KiB4140

hero.svgD03-May-20242.4 KiB5250

index.htmlD03-May-2024999 3114

paper-dialog-behavior.htmlD03-May-20244.6 KiB141105

paper-dialog-common.cssD03-May-20241.3 KiB5845

paper-dialog-shared-styles.htmlD03-May-20242.6 KiB8447

README.md

1
2<!---
3
4This README is automatically generated from the comments in these files:
5paper-dialog-behavior.html
6
7Edit those files, and our readme bot will duplicate them over here!
8Edit this file, and the bot will squash your changes :)
9
10The bot does some handling of markdown. Please file a bug if it does the wrong
11thing! https://github.com/PolymerLabs/tedium/issues
12
13-->
14
15[![Build status](https://travis-ci.org/PolymerElements/paper-dialog-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-dialog-behavior)
16
17_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dialog-behavior)_
18
19
20##Polymer.PaperDialogBehavior
21
22Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to implement a Material Design
23dialog.
24
25For example, if `<paper-dialog-impl>` implements this behavior:
26
27```html
28<paper-dialog-impl>
29    <h2>Header</h2>
30    <div>Dialog body</div>
31    <div class="buttons">
32        <paper-button dialog-dismiss>Cancel</paper-button>
33        <paper-button dialog-confirm>Accept</paper-button>
34    </div>
35</paper-dialog-impl>
36```
37
38`paper-dialog-shared-styles.html` provide styles for a header, content area, and an action area for buttons.
39Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the
40`paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area.
41
42Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls to close the
43dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReason` will update
44to include `confirmed: true`.
45
46### Accessibility
47
48This element has `role="dialog"` by default. Depending on the context, it may be more appropriate
49to override this attribute with `role="alertdialog"`.
50
51If `modal` is set, the element will set `aria-modal` and prevent the focus from exiting the element.
52It will also ensure that focus remains in the dialog.
53
54
55