Skip to content
Snippets Groups Projects
Commit d835db8b authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Improve modal webcomponent

parent 682a0146
No related branches found
No related tags found
No related merge requests found
Pipeline #207474 failed
......@@ -14,6 +14,8 @@ export class Modal extends DBPLitElement {
this.lang = this._i18n.language;
this.modalId = 'dbp-modal-id';
this.title = "Modal Title";
// TODO add with/height
}
static get properties() {
......@@ -39,6 +41,10 @@ export class Modal extends DBPLitElement {
});
}
close() {
MicroModal.close(this._('#' + this.modalId));
}
static get styles() {
// language=css
return css`
......@@ -93,9 +99,7 @@ export class Modal extends DBPLitElement {
title="${i18n.t('dbp-modal.close')}"
class="modal-close"
aria-label="Close modal"
@click="${() => {
MicroModal.close(this._('#' + this.modalId));
}}">
@click="${() => {this.close()}}">
<dbp-icon
title="${i18n.t('dbp-modal.close')}"
name="close"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment