@primer/behaviors 0.0.0-2022312101859 → 0.0.0-2022312164158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,8 +87,8 @@ class ModalDialogElement extends HTMLElement {
|
|
|
87
87
|
show() {
|
|
88
88
|
this.open = true;
|
|
89
89
|
}
|
|
90
|
-
close(
|
|
91
|
-
const eventType =
|
|
90
|
+
close(closed = false) {
|
|
91
|
+
const eventType = closed ? 'close' : 'cancel';
|
|
92
92
|
const dialogEvent = new Event(eventType);
|
|
93
93
|
this.dispatchEvent(dialogEvent);
|
|
94
94
|
this.open = false;
|
|
@@ -85,8 +85,8 @@ class ModalDialogElement extends HTMLElement {
|
|
|
85
85
|
show() {
|
|
86
86
|
this.open = true;
|
|
87
87
|
}
|
|
88
|
-
close(
|
|
89
|
-
const eventType =
|
|
88
|
+
close(closed = false) {
|
|
89
|
+
const eventType = closed ? 'close' : 'cancel';
|
|
90
90
|
const dialogEvent = new Event(eventType);
|
|
91
91
|
this.dispatchEvent(dialogEvent);
|
|
92
92
|
this.open = false;
|