Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created October 21, 2018 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YonatanKra/0f678527a1bf60eb168116cb63fda561 to your computer and use it in GitHub Desktop.
Save YonatanKra/0f678527a1bf60eb168116cb63fda561 to your computer and use it in GitHub Desktop.
Index.js moved to the src/demo
import '../main';
const modalWindow = document.createElement('ce-modal-window');
modalWindow.addEventListener('click', () => {
modalWindow.close();
});
document.body.appendChild(modalWindow);
const button = document.createElement('button');
button.innerText = 'Open modal';
button.addEventListener('click', () => {
modalWindow.open({
content: '<h1>Hello Modal</h1>',
height: 50,
width: 100
});
});
document.body.appendChild(button);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment