2020-09-13 16:24:48 +00:00
|
|
|
import { customElement, html, LitElement } from 'lit-element';
|
|
|
|
|
|
|
|
import {DeesForm} from './dees-form';
|
|
|
|
|
2021-02-13 21:52:36 +00:00
|
|
|
declare global {
|
|
|
|
interface HTMLElementTagNameMap {
|
|
|
|
'dees-form-submit': DeesFormSubmit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-13 16:24:48 +00:00
|
|
|
@customElement('dees-form-submit')
|
|
|
|
export class DeesFormSubmit extends LitElement {
|
|
|
|
|
|
|
|
|
|
|
|
public render() {
|
|
|
|
return html`
|
|
|
|
<dees-button @click="${this.submit}">${this.textContent}</dees-button>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
|
|
|
|
public async submit() {
|
|
|
|
const parentElement: DeesForm = this.parentElement as DeesForm;
|
|
|
|
parentElement.gatherAndDispatch();
|
|
|
|
}
|
|
|
|
}
|