mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-04 03:25:30 +08:00
### What problem does this PR solve? Feat: Adapt the theme of the documentation page. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
20 lines
461 B
TypeScript
20 lines
461 B
TypeScript
import { ExternalToast, toast } from 'sonner';
|
|
|
|
const configuration: ExternalToast = { duration: 2500, position: 'top-center' };
|
|
|
|
const message = {
|
|
success: (msg: string) => {
|
|
toast.success(msg, configuration);
|
|
},
|
|
error: (msg: string) => {
|
|
toast.error(msg, configuration);
|
|
},
|
|
warning: (msg: string) => {
|
|
toast.warning(msg, configuration);
|
|
},
|
|
info: (msg: string) => {
|
|
toast.info(msg, configuration);
|
|
},
|
|
};
|
|
export default message;
|