mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-02 12:37:06 +00:00
19 lines
391 B
TypeScript
19 lines
391 B
TypeScript
![]() |
import { message } from 'antd';
|
||
|
import { ReactNode } from 'react';
|
||
|
|
||
|
export enum ToastType {
|
||
|
INFO = 'info',
|
||
|
ERROR = 'error',
|
||
|
SUCCESS = 'success',
|
||
|
WARNING = 'warning',
|
||
|
LOADING = 'loading',
|
||
|
}
|
||
|
|
||
|
export const showToastMessage = (type: ToastType, content: string | ReactNode, duration: number) => {
|
||
|
message.open({
|
||
|
type,
|
||
|
content,
|
||
|
duration,
|
||
|
});
|
||
|
};
|