diff --git a/src/events/events.ts b/src/events/events.ts index 3481c5ea..9b5fff18 100644 --- a/src/events/events.ts +++ b/src/events/events.ts @@ -6,3 +6,4 @@ export { default as SlSelectionChangeEvent } from './sl-selection-change'; export { default as SlTabHideEvent } from './sl-tab-hide'; export { default as SlTabShowEvent } from './sl-tab-show'; export { default as SlErrorEvent } from './sl-error'; +export { default as SlRequestCloseEvent } from './sl-request-close'; diff --git a/src/events/sl-request-close.ts b/src/events/sl-request-close.ts new file mode 100644 index 00000000..c52c391a --- /dev/null +++ b/src/events/sl-request-close.ts @@ -0,0 +1,9 @@ +type SlRequestCloseEvent = CustomEvent<{ source: 'close-button' | 'keyboard' | 'overlay' }>; + +declare global { + interface GlobalEventHandlersEventMap { + 'sl-request-close': SlRequestCloseEvent; + } +} + +export default SlRequestCloseEvent;