xref: /MusicFree/src/utils/toast.ts (revision d1a36a67ac3d03c61d8bafd8ac2bc121ea4f6f3e)
1import {IToastConfig, showToast} from '@/components/base/toast';
2
3function success(message: string, config?: IToastConfig) {
4    showToast({
5        message,
6        ...config,
7        type: 'success',
8    });
9}
10
11function warn(message: string, config?: IToastConfig) {
12    showToast({
13        message,
14        ...config,
15        type: 'warn',
16    });
17}
18
19const Toast = {
20    success,
21    warn,
22};
23
24export default Toast;
25