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