diff --git a/app/layout.tsx b/app/layout.tsx index e1a34ed..3e09640 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -47,5 +47,11 @@ const styles = stylex.create({ backgroundColor: "black", color: 'white', }, + span: { + color: 'rgb(20, 22, 27)', // Default span color in light mode + }, + spanDark: { + color: 'white', // Span color in dark mode + }, }); diff --git a/src/widgets/Navbar/ui/navbar.tsx b/src/widgets/Navbar/ui/navbar.tsx index edae232..1a6d501 100644 --- a/src/widgets/Navbar/ui/navbar.tsx +++ b/src/widgets/Navbar/ui/navbar.tsx @@ -6,11 +6,12 @@ import stylex from '@stylexjs/stylex'; import Image from 'next/image'; import Logo from '@/shared/ui/icons/GDSCLogo.svg'; import { styles } from './styles'; +import { useTheme } from 'next-themes'; export const Navbar = () => { - - + const { theme } = useTheme(); + const spanClass = theme === 'dark' ? styles.spanDark : null; return (
diff --git a/src/widgets/Navbar/ui/styles.ts b/src/widgets/Navbar/ui/styles.ts index 72f8ace..5ed235c 100644 --- a/src/widgets/Navbar/ui/styles.ts +++ b/src/widgets/Navbar/ui/styles.ts @@ -28,5 +28,8 @@ export const styles = stylex.create({ ':hover': 'solid', }, }, + spanDark: { + color: 'white', // Span color in dark mode + }, });