From a07c0357f011ac1b195f5dd2a775443c11e120e4 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Mon, 4 Dec 2023 16:41:41 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Added=20code=20for=20dark=20mode?= =?UTF-8?q?=20toggle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/components/shared/Navbar2.tsx | 38 ++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/client/components/shared/Navbar2.tsx b/src/client/components/shared/Navbar2.tsx index e1e7568..96830c5 100644 --- a/src/client/components/shared/Navbar2.tsx +++ b/src/client/components/shared/Navbar2.tsx @@ -1,6 +1,13 @@ -import React, { ReactElement } from "react"; +import React, { ReactElement, useState } from "react"; export const Navbar2 = (): ReactElement => { + const [isLightMode, setIsLightMode] = useState(false); + + const handleToggle = () => { + setIsLightMode(!isLightMode); + // Add your code for enabling dark/light mode here + }; + return (
{/* Logo */} @@ -64,12 +71,13 @@ export const Navbar2 = (): ReactElement => { {/* Right-most Nav */}