You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: elements/pfe-modal/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
## Slots
20
20
21
21
### Trigger
22
-
The only part visible on page load, the trigger opens the modal window. The trigger can be a button, a cta or a link.
22
+
The only part visible on page load, the trigger opens the modal window. The trigger can be a button, a cta or a link. While it is part of the modal web component, it does not contain any intrinsic styles.
23
23
24
24
### Header
25
25
The header is an optional slot that appears at the top of the modal window. It should be a header tag (h2-h6).
@@ -30,12 +30,12 @@ The default slot can contain any type of content. When the header is not present
30
30
## Events
31
31
32
32
### openModal
33
-
Fires when a user clicks on the trigger.
33
+
Fires when a user clicks on the trigger. openModal can be accessed from outside the web component by getting the modal that you want to fire and passing in the firing event: `document.querySelector("pfe-modal#custom-id").openModal(event).`
34
34
35
35
### closeModal
36
-
Fires when either a user clicks on either the close button or the overlay.
37
-
36
+
Fires when either a user clicks on either the close button or the overlay. closeModal can be accessed from outside the web component by getting the modal that you want to fire and passing in the firing event: `document.querySelector("pfe-modal#custom-id").closeModal(event).`
38
37
38
+
### Dependencies
39
39
Make sure you have [Polyserve][polyserve] and [Web Component Tester][web-component-tester] installed.
0 commit comments