Skip to content

Commit

Permalink
Fixed notification style
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush259 committed Nov 14, 2024
1 parent f8b2e45 commit 78f12e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ToastContextProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const ToastProvider = ({ children }) => {

return (
<ToastContext.Provider value={{ addToast }}>
<div className="w-fit fixed bottom-5 right-5 z-50 flex flex-col duration-500 h-fit">
<div className="w-screen md:w-fit fixed bottom-5 md:right-5 z-50 flex flex-col duration-500 h-fit">
{toasts.map((toast) => (
<Toast key={toast.id} message={toast.message} success={toast.success} onClose={() => removeToast(toast.id)} />
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/toaster/Toast.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Toast = ({ message, onClose, success }) => {
}, [])

return (
<div className="bg-slate-800 max-w-[80vw] min-w-[350px] p-3 md:py-4 md:px-8 text-center text-white flex justify-between items-center rounded-xl m-2 md:text-xl overflow-ellipsis animate-in relative overflow-hidden">
<div className="bg-slate-800 max-w-[80vw] w-[350px] mx-auto md:mx-0 p-3 md:py-4 md:px-8 text-center text-white flex justify-between items-center rounded-xl m-2 md:text-xl overflow-ellipsis animate-in relative overflow-hidden">
<div
className={`absolute h-1 left-0 bottom-0 ${success ? 'bg-green-500' : 'bg-red-500'} animate-toast`}
/>
Expand Down

0 comments on commit 78f12e0

Please sign in to comment.