mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-23 14:23:39 +08:00
returning banner id
This commit is contained in:
parent
1481f292ac
commit
ea6fbfb21e
1 changed files with 5 additions and 3 deletions
|
@ -254,8 +254,8 @@ export function addBanner(
|
|||
sticky = false,
|
||||
closeCallback?: () => void,
|
||||
allowHTML?: boolean
|
||||
): void {
|
||||
new Notification(
|
||||
): number {
|
||||
const banner = new Notification(
|
||||
"banner",
|
||||
message,
|
||||
level,
|
||||
|
@ -264,7 +264,9 @@ export function addBanner(
|
|||
customIcon,
|
||||
closeCallback,
|
||||
allowHTML
|
||||
).show();
|
||||
);
|
||||
banner.show();
|
||||
return banner.id;
|
||||
}
|
||||
|
||||
const debouncedMarginUpdate = debounce(100, updateMargin);
|
||||
|
|
Loading…
Reference in a new issue