Add theme toggle and button components to UI
Integrated a ThemeToggle component into the Navbar for dark/light mode switching and created a reusable Button component with configurable styles. Updated `.gitignore` to exclude the `lib` folder for cleanup.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import { useAuth } from "@/context/auth-context";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import ThemeToggle from "@/components/ui/theme-toggle";
|
||||
|
||||
export default function Navbar() {
|
||||
const { user, isAuthenticated, logout } = useAuth();
|
||||
@@ -45,7 +46,9 @@ export default function Navbar() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center">
|
||||
<div className="flex items-center space-x-4">
|
||||
<ThemeToggle />
|
||||
|
||||
{isAuthenticated ? (
|
||||
<div className="flex items-center space-x-4">
|
||||
<span className="text-sm text-slate-600 dark:text-slate-300">
|
||||
|
||||
Reference in New Issue
Block a user