web: use constants for custom event names

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-23 15:16:56 +01:00
parent 56344cadeb
commit 068d281b19
18 changed files with 38 additions and 19 deletions

View File

@ -2,6 +2,7 @@ import { CSSResult, customElement, html, LitElement, TemplateResult } from "lit-
import PFBase from "@patternfly/patternfly/patternfly-base.css";
import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css";
import FA from "@fortawesome/fontawesome-free/css/fontawesome.css";
import { EVENT_NOTIFICATION_TOGGLE } from "../../constants";
@customElement("ak-notification-trigger")
export class NotificationRule extends LitElement {
@ -14,7 +15,7 @@ export class NotificationRule extends LitElement {
super();
this.addEventListener("click", () => {
this.dispatchEvent(
new CustomEvent("ak-notification-toggle", {
new CustomEvent(EVENT_NOTIFICATION_TOGGLE, {
bubbles: true,
composed: true,
})