diff --git a/src/components/Toast/index.tsx b/src/components/Toast/index.tsx new file mode 100644 index 00000000..2fb7e6c3 --- /dev/null +++ b/src/components/Toast/index.tsx @@ -0,0 +1,106 @@ +import React from 'react'; +import type { ToastProps } from 'react-toast-notifications'; + +const Toast: React.FC = ({ appearance, children, onDismiss }) => { + return ( +
+
+
+
+
+
+ {appearance === 'success' && ( + + + + )} + + {appearance === 'error' && ( + + + + )} + + {appearance === 'info' && ( + + + + )} + + {appearance === 'warning' && ( + + + + )} +
+
{children}
+
+ +
+
+
+
+
+
+ ); +}; + +export default Toast; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 85ab090d..81f2fa9d 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -11,6 +11,7 @@ import { User } from '../hooks/useUser'; import { IntlProvider } from 'react-intl'; import { LanguageContext, AvailableLocales } from '../context/LanguageContext'; import Head from 'next/head'; +import Toast from '../components/Toast'; const loadLocaleData = (locale: string) => { switch (locale) { @@ -76,7 +77,7 @@ const CoreApp: Omit = ({ defaultLocale="en" messages={loadedMessages} > - + Overseerr diff --git a/src/styles/globals.css b/src/styles/globals.css index 49a66be9..e93708f7 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -21,10 +21,14 @@ body { } .hide-scrollbar { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ } .hide-scrollbar::-webkit-scrollbar { display: none; } + +.toast { + width: 360px; +}