2023-07-25 20:27:29 +03:00
|
|
|
import { ToastContainer, type ToastContainerProps } from 'react-toastify';
|
|
|
|
|
2023-12-13 14:32:57 +03:00
|
|
|
import { useConceptTheme } from '@/context/ThemeContext';
|
2023-07-15 17:57:25 +03:00
|
|
|
|
2023-12-28 14:04:44 +03:00
|
|
|
interface ToasterThemedProps extends Omit<ToastContainerProps, 'theme'> {}
|
2023-07-26 23:11:00 +03:00
|
|
|
|
2023-11-27 13:50:56 +03:00
|
|
|
function ToasterThemed(props: ToasterThemedProps) {
|
2023-07-25 00:20:37 +03:00
|
|
|
const { darkMode } = useConceptTheme();
|
2023-07-25 20:27:29 +03:00
|
|
|
|
2023-12-28 14:04:44 +03:00
|
|
|
return <ToastContainer theme={darkMode ? 'dark' : 'light'} {...props} />;
|
2023-07-15 17:57:25 +03:00
|
|
|
}
|
2023-07-26 23:11:00 +03:00
|
|
|
|
2023-12-28 14:04:44 +03:00
|
|
|
export default ToasterThemed;
|