-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ts
More file actions
34 lines (27 loc) · 1.12 KB
/
test.ts
File metadata and controls
34 lines (27 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { iPopup } from "./src";
const globalPopupInstance = new iPopup();
const popupInstance = globalPopupInstance.create({
type: "defaultPopup || image || video | jsx || without overlay || ",
// https://www.npmjs.com/package/jsx-to-html
// https://github.com/humaan/Modaal
insertIntoDomElem: "HTMLelement || query string selector",
template: '<div>Popup template</div>',
modalClassName: 'html class names',
overlayClassName: 'html class names',
position: 'top || center || bottom',
closeOnClickOutside: true,
closeOnEsc: true,
disableScroll: false,
catchFocus: true, // If true – when modal window is opened, focus will looped on active elements inside modal. When modal window closing, focus returning on previous selector.
// https://addmorescripts.github.io/hystModal/
beforeCreate: ()=>{},
onCreated: ()=>{},
beforeShow: ()=>{},
onShowCallBack: ()=>{},
beforeHide: ()=>{},
onHideCallBack: ()=>{},
beforeDestroy: ()=>{},
onDestroyed: ()=>{},
});
console.log("🚀 ~ popupInstance:", popupInstance);
console.log("-> globalPopupInstance", globalPopupInstance);