mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
14 lines
361 B
TypeScript
14 lines
361 B
TypeScript
![]() |
import { ToastContainer, ToastContainerProps } from 'react-toastify';
|
||
|
import { useTheme } from '../context/ThemeContext';
|
||
|
|
||
|
function ToasterThemed({theme, ...props}: ToastContainerProps) {
|
||
|
const { darkMode } = useTheme();
|
||
|
|
||
|
return (
|
||
|
<ToastContainer
|
||
|
theme={ darkMode ? 'dark' : 'light'}
|
||
|
{...props}
|
||
|
/>
|
||
|
);
|
||
|
}
|
||
|
export default ToasterThemed;
|