Skip to content

Commit e7eede3

Browse files
committed
feat: make gmail notification look like in macos
1 parent 0ca0f94 commit e7eede3

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

apps/marketing-app/src/app/components/gmail-notification.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,47 @@ export function GmailNotification() {
1111
setIsVisible(true);
1212
}, 1500);
1313

14+
// Hide notification after 7 seconds
15+
const hideTimer = setTimeout(() => {
16+
setIsVisible(false);
17+
}, 8500); // 1500ms delay + 7000ms visible = 8500ms total
18+
1419
return () => {
1520
clearTimeout(timer);
21+
clearTimeout(hideTimer);
1622
};
1723
}, []);
1824

1925
return (
2026
<div
21-
className={`fixed top-20 right-2 z-[60] transition-all duration-500 ease-out p-2 ${
27+
className={`fixed top-20 right-2 z-[60] transition-all duration-300 ease-out max-sm:mx-3 ${
2228
isVisible
23-
? "translate-x-0 opacity-100"
24-
: "translate-x-full opacity-0"
29+
? "translate-x-0 max-sm:translate-x-0 max-sm:translate-y-0 opacity-100"
30+
: "translate-x-full max-sm:translate-x-0 max-sm:-translate-y-full opacity-0"
2531
}`}
2632
>
2733
{/* macOS notification container - glass effect */}
28-
<div className="bg-black/20 backdrop-blur-3xl rounded-xl shadow-2xl w-96 overflow-hidden border border-white/10 ring-1 ring-black/5">
34+
<div className="bg-black/40 backdrop-blur-3xl rounded-2xl shadow-2xl w-96 max-sm:w-full overflow-hidden border border-white/10 ring-1 ring-black/5">
2935
{/* Main content */}
30-
<div className="px-4 pb-4 pt-4">
36+
<div className="px-4 pb-3 pt-3">
3137
<div className="flex items-center gap-3">
3238
{/* Gmail logo */}
33-
<div className="w-16 h-16 bg-white rounded-full flex items-center justify-center flex-shrink-0 shadow-sm">
39+
<div className="w-12 h-12 bg-white rounded-full flex items-center justify-center flex-shrink-0 shadow-sm">
3440
<img
3541
src="/gmail-icon.png"
3642
alt="Gmail"
37-
className="w-12 h-12 object-contain"
43+
className="w-8 h-8 object-contain"
3844
/>
3945
</div>
4046

4147
{/* Email content */}
4248
<div className="flex-1 min-w-0">
43-
<div className="mb-1">
44-
<span className="text-white font-medium text-sm">What has been done this week?</span>
49+
<div className="mb-0.5">
50+
<span className="text-white font-medium text-sm">What have you done this week?</span>
4551
</div>
4652

47-
<p className="text-white/80 text-sm leading-relaxed">
48-
Hi, I'm your manager. It's time for portion of annoying questions about your work that has been done, or avoid this shit and use AsyncStatus.
53+
<p className="text-white/80 text-sm leading-snug">
54+
Manager here. It's time for the annoying progress status questions, or avoid this shit and use AsyncStatus.
4955
</p>
5056
</div>
5157
</div>

0 commit comments

Comments
 (0)