Created
October 21, 2018 14:27
-
-
Save YonatanKra/0f678527a1bf60eb168116cb63fda561 to your computer and use it in GitHub Desktop.
Index.js moved to the src/demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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