mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: better config page layout
This commit is contained in:
27 files changed
+748
-377
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
export default class Notification {
|
||||
type: string;
|
||||
action: any;
|
||||
$dom: JQuery<HTMLElement>;
|
||||
$n: JQuery<HTMLElement>;
|
||||
duration: number;
|
||||
autoHideTimer?: NodeJS.Timeout;
|
||||
|
||||
static async success(message: string, duration?: number) {
|
||||
return toast.success(message, { autoClose: duration });
|
||||
}
|
||||
|
||||
static async info(message: string, duration?: number) {
|
||||
return toast.info(message, { autoClose: duration });
|
||||
}
|
||||
|
||||
static async warn(message: string, duration?: number) {
|
||||
return toast.warning(message, { autoClose: duration });
|
||||
}
|
||||
|
||||
static async error(message: string, duration?: number) {
|
||||
return toast.error(message, { autoClose: duration });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user