mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 07:26:07 +00:00
Merge branch 'v28'
This commit is contained in:
@@ -8,6 +8,7 @@ export class OModal extends LitElement {
|
||||
@property({ type: String }) title = "";
|
||||
@property({ type: String }) translationKey = "";
|
||||
@property({ type: Boolean }) alwaysMaximized = false;
|
||||
@property({ type: Function }) onClose?: () => void;
|
||||
|
||||
static styles = css`
|
||||
.c-modal {
|
||||
@@ -75,10 +76,10 @@ export class OModal extends LitElement {
|
||||
this.isModalOpen = true;
|
||||
}
|
||||
public close() {
|
||||
this.isModalOpen = false;
|
||||
this.dispatchEvent(
|
||||
new CustomEvent("modal-close", { bubbles: true, composed: true }),
|
||||
);
|
||||
if (this.isModalOpen) {
|
||||
this.isModalOpen = false;
|
||||
this.onClose?.();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user