Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Importiere das Modul aus der Lib.
- import Modal from '../lib/modal';
- // Exportiere eine init function in der alles nötige für das Modul initialisiert wird.
- export default function init() {
- return new Modal({
- nodes: document.querySelectorAll('[data-modal]'),
- overlay: document.querySelectorAll('[data-modal-overlay]')[0],
- triggers: {
- open: document.querySelectorAll('[data-modal-open]'),
- close: document.querySelectorAll('[data-modal-close]'),
- },
- }).init();
- }
Add Comment
Please, Sign In to add comment