Feat: Adapt the theme of the documentation page. #10427 (#12337)

### 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)
This commit is contained in:
balibabu
2025-12-30 19:35:44 +08:00
committed by GitHub
parent 4705d07e11
commit 2fccf3924d
2 changed files with 13 additions and 23 deletions

View File

@ -1,35 +1,19 @@
import { toast } from 'sonner';
import { ExternalToast, toast } from 'sonner';
const duration = { duration: 2500 };
const configuration: ExternalToast = { duration: 2500, position: 'top-center' };
const message = {
success: (msg: string) => {
toast.success(msg, {
position: 'top-center',
closeButton: false,
...duration,
});
toast.success(msg, configuration);
},
error: (msg: string) => {
toast.error(msg, {
position: 'top-center',
closeButton: false,
...duration,
});
toast.error(msg, configuration);
},
warning: (msg: string) => {
toast.warning(msg, {
position: 'top-center',
closeButton: false,
...duration,
});
toast.warning(msg, configuration);
},
info: (msg: string) => {
toast.info(msg, {
position: 'top-center',
closeButton: false,
...duration,
});
toast.info(msg, configuration);
},
};
export default message;