Files
NapCatQQ/napcat.webui/src/components/toaster.tsx
T
时瑾 2185a884b4 refactor: 优化eslint配置,提升代码质量 (#1341)
* feat: 统一并标准化eslint

* lint: napcat.webui

* lint: napcat.webui

* lint: napcat.core

* build: fix

* lint: napcat.webui

* refactor: 重构eslint

* Update README.md
2025-11-03 16:30:45 +08:00

22 lines
419 B
TypeScript

import { Toaster as HotToaster } from 'react-hot-toast';
import { useTheme } from '@/hooks/use-theme';
export const Toaster = () => {
const { isDark } = useTheme();
return (
<HotToaster
toastOptions={{
style: {
borderRadius: '20px',
background: isDark ? '#333' : '#fff',
color: isDark ? '#fff' : '#333',
},
}}
/>
);
};
export default Toaster;