mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
406 B
19 lines
406 B
export default class extends HTMLElement {
|
|
connectedCallback () {
|
|
const dialog = document.getElementById(this.dataset.target)
|
|
|
|
this.querySelector('button').addEventListener('click', () => {
|
|
if (dialog) {
|
|
dialog.inert = false
|
|
dialog.showModal()
|
|
}
|
|
})
|
|
|
|
if (dialog) {
|
|
dialog.addEventListener('close', () => {
|
|
dialog.inert = true
|
|
})
|
|
}
|
|
}
|
|
}
|