mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
11 lines
415 B
TypeScript
11 lines
415 B
TypeScript
import { ToastContainer, type ToastContainerProps } from 'react-toastify';
|
|
|
|
import { usePreferencesStore } from '@/stores/preferences';
|
|
|
|
interface ToasterThemedProps extends Omit<ToastContainerProps, 'theme'> {}
|
|
|
|
export function ToasterThemed(props: ToasterThemedProps) {
|
|
const darkMode = usePreferencesStore(state => state.darkMode);
|
|
return <ToastContainer theme={darkMode ? 'dark' : 'light'} {...props} />;
|
|
}
|