diff options
author | crupest <crupest@outlook.com> | 2021-07-01 19:59:22 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-07-01 19:59:22 +0800 |
commit | 47175cf9afcd86b0b92f7121ce0c3d85b948b6dd (patch) | |
tree | 58573f98df9815fe677f2345c5ce944fe4a65c11 /FrontEnd/src/services | |
parent | e5af20ffe6a1091a022f97c65f3091f245dfd1d7 (diff) | |
download | timeline-47175cf9afcd86b0b92f7121ce0c3d85b948b6dd.tar.gz timeline-47175cf9afcd86b0b92f7121ce0c3d85b948b6dd.tar.bz2 timeline-47175cf9afcd86b0b92f7121ce0c3d85b948b6dd.zip |
...
Diffstat (limited to 'FrontEnd/src/services')
-rw-r--r-- | FrontEnd/src/services/alert.ts | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/FrontEnd/src/services/alert.ts b/FrontEnd/src/services/alert.ts index 48d482ea..abe56315 100644 --- a/FrontEnd/src/services/alert.ts +++ b/FrontEnd/src/services/alert.ts @@ -1,11 +1,13 @@ import React from "react"; import pull from "lodash/pull"; -import { BootstrapThemeColor, I18nText } from "@/common"; +import { I18nText } from "@/common"; +import { PaletteColorType } from "@/palette"; export interface AlertInfo { - type?: BootstrapThemeColor; - message: React.FC<unknown> | I18nText; + type?: PaletteColorType; + message?: I18nText; + customMessage?: React.ReactElement; dismissTime?: number | "never"; } @@ -55,9 +57,3 @@ export const alertService = new AlertService(); export function pushAlert(alert: AlertInfo): void { alertService.push(alert); } - -export const kAlertHostId = "alert-host"; - -export function getAlertHost(): HTMLElement | null { - return document.getElementById(kAlertHostId); -} |