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.
28 lines
599 B
28 lines
599 B
import { target, targetable } from '@github/catalyst/lib/targetable'
|
|
|
|
export default targetable(class extends HTMLElement {
|
|
static [target.static] = [
|
|
'prompt',
|
|
'processing',
|
|
'logo'
|
|
]
|
|
|
|
connectedCallback () {
|
|
this.form.addEventListener('submit', this.onSubmit)
|
|
}
|
|
|
|
disconnectedCallback () {
|
|
this.form.removeEventListener('submit', this.onSubmit)
|
|
}
|
|
|
|
onSubmit = () => {
|
|
this.prompt.classList.add('hidden')
|
|
this.processing.classList.remove('hidden')
|
|
this.logo.classList.add('animate-bounce')
|
|
}
|
|
|
|
get form () {
|
|
return this.querySelector('form')
|
|
}
|
|
})
|