Create toast component and implement to App.tsx

This commit is contained in:
2023-10-29 12:47:55 +07:00
parent 5b6e25b2c7
commit 96be7c42f9
2 changed files with 28 additions and 19 deletions
+26
View File
@@ -0,0 +1,26 @@
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;