From 77486657891b8691e7127eb4c1b92d7e9635cc09 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 10 Nov 2025 10:47:10 +0530 Subject: [PATCH 1/2] feat(premium-button): add compact mode option for smaller button size - Introduce a `compact` prop to PremiumButton for a more compact display - Adjust padding, font size, and icon size according to compact mode - Hide sparkles effect on the compact version of the button style(header): refine spacing and sizing of header elements - Decrease horizontal padding on container for better alignment - Reduce spacing between auth buttons in desktop header - Add padding and size adjustments to sign in and sign up buttons - Apply compact variant to PremiumButton in header user menu for consistency --- components/PremiumButton.tsx | 15 +++++++++------ components/header.tsx | 14 +++++++------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/components/PremiumButton.tsx b/components/PremiumButton.tsx index 2837093e..45e5d71f 100644 --- a/components/PremiumButton.tsx +++ b/components/PremiumButton.tsx @@ -10,9 +10,10 @@ import { User } from '@supabase/supabase-js'; interface PremiumButtonProps { user: User; className?: string; + compact?: boolean; } -export default function PremiumButton({ user, className = '' }: PremiumButtonProps) { +export default function PremiumButton({ user, className = '', compact = false }: PremiumButtonProps) { const [isPremium, setIsPremium] = useState(false); const [isLoading, setIsLoading] = useState(true); const supabase = createClient(); @@ -66,7 +67,7 @@ export default function PremiumButton({ user, className = '' }: PremiumButtonPro {isPremium ? ( ) : ( )} diff --git a/components/header.tsx b/components/header.tsx index b67e712a..9753e656 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -66,7 +66,7 @@ export default function Header() { return (
-
+
{/* logo section - left */}
@@ -99,22 +99,22 @@ export default function Header() { {/* desktop auth & theme - right */} -
+
{/* */} {loading ? (
Loading...
) : user ? ( -
+
) : ( <> - - @@ -126,7 +126,7 @@ export default function Header() { {/* */} {!loading && user && (
- +
)} @@ -134,7 +134,7 @@ export default function Header() { variant="ghost" size="icon" onClick={() => setIsMenuOpen(!isMenuOpen)} - className={`hover:scale-105 transition-all duration-200 ml-1 ${ + className={`hover:scale-105 transition-all duration-200 ml-1 w-8 h-8 ${ isMenuOpen ? 'bg-muted/50' : '' }`} > From 6a1bf519faf651bb08d395d0a9e395e15103c1e9 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 10 Nov 2025 11:17:23 +0530 Subject: [PATCH 2/2] feat(header): Enhance mobile navigation with slide-in menu and backdrop overlay - Add slide-in mobile navigation menu with full-page overlay - Implement backdrop overlay with blur effect for mobile menu - Improve mobile menu button interaction and styling - Enhance mobile navigation UX with smooth animations - Maintain consistent design language across desktop and mobile views --- components/header.tsx | 263 +++++++++++++++++++++++------------------- 1 file changed, 144 insertions(+), 119 deletions(-) diff --git a/components/header.tsx b/components/header.tsx index 9753e656..ed9b2db3 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -65,137 +65,162 @@ export default function Header() { ] return ( -
-
- {/* logo section - left */} -
- - - -
- - {/* desktop nav - center */} - - {/* mobile menu button */} -
- {/* */} - {!loading && user && ( -
- - -
- )} - + {/* desktop auth & theme - right */} +
+ {/* */} + {loading ? ( +
Loading...
+ ) : user ? ( +
+ + + +
+ ) : ( + <> + + + + )} +
+ + {/* mobile menu button */} +
+ {/* */} + {!loading && user && ( +
+ + +
+ )} + +
-
+
- {/* mobile nav*/} + {/* mobile nav - slide from right (outside header for full page overlay) */} {isMenuOpen && ( -
- +
+ )} -
+ ) } \ No newline at end of file