mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 20:01:59 +00:00
27 lines
484 B
TypeScript
27 lines
484 B
TypeScript
import { Toaster } from 'react-hot-toast';
|
|
|
|
const Toast = () => {
|
|
return (
|
|
<Toaster
|
|
position="top-center"
|
|
gutter={12}
|
|
containerStyle={{ margin: '8px', zIndex: 1 }}
|
|
toastOptions={{
|
|
success: {
|
|
duration: 3000,
|
|
},
|
|
error: {
|
|
duration: 5000,
|
|
},
|
|
style: {
|
|
fontSize: '16px',
|
|
maxWidth: '500px',
|
|
padding: '16px 24px',
|
|
},
|
|
}}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default Toast;
|