diff options
author | crupest <crupest@outlook.com> | 2021-07-01 20:38:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 20:38:28 +0800 |
commit | eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c (patch) | |
tree | 5afe2d654a51c8712aa30a419f6edfa19fe1a234 /FrontEnd/src/services/alert.ts | |
parent | 825aac426d87180e62530321320fbb012efbd897 (diff) | |
parent | b456334cedad566bf2c4c66481ec928dc59eda7d (diff) | |
download | timeline-eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c.tar.gz timeline-eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c.tar.bz2 timeline-eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c.zip |
Merge pull request #649 from crupest/drop-bootstrap
Drop bootstrap!!!
Diffstat (limited to 'FrontEnd/src/services/alert.ts')
-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); -} |