mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-27 13:30:36 +03:00
21 lines
498 B
TypeScript
21 lines
498 B
TypeScript
import 'react-toastify/dist/ReactToastify.css';
|
|
|
|
import { ToastContainer, type ToastContainerProps } from 'react-toastify';
|
|
|
|
import { useConceptTheme } from '../context/ThemeContext';
|
|
|
|
interface ToasterThemedProps extends Omit<ToastContainerProps, 'theme'>{}
|
|
|
|
function ToasterThemed({ ...props }: ToasterThemedProps) {
|
|
const { darkMode } = useConceptTheme();
|
|
|
|
return (
|
|
<ToastContainer
|
|
theme={ darkMode ? 'dark' : 'light'}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default ToasterThemed;
|