diff --git a/src/app/components/CodeSnippet.module.css b/src/app/components/CodeSnippet.module.css index 257ba6e..4b6b06d 100644 --- a/src/app/components/CodeSnippet.module.css +++ b/src/app/components/CodeSnippet.module.css @@ -14,6 +14,7 @@ border-top-right-radius: 10px; border-top-left-radius: 10px; font-size: 1rem; + color: white; } .snippetContent>pre { diff --git a/src/app/components/Main.tsx b/src/app/components/Main.tsx index e5749fa..6f97a05 100644 --- a/src/app/components/Main.tsx +++ b/src/app/components/Main.tsx @@ -1,4 +1,7 @@ +'use client'; + import { Fragment } from 'react'; +import { themes, useThemeContext } from '../theme'; import { DocSection } from '../types/types'; import styles from './Main.module.css'; import Section from './Section'; @@ -8,8 +11,11 @@ export default function Main({ }: { versionSections: DocSection[]; }) { + const { theme } = useThemeContext(); + const themeStyles = themes[theme]; + return ( -
+
{versionSections.map(section => (
diff --git a/src/app/components/NavBar.tsx b/src/app/components/NavBar.tsx index 48ea0da..6dec8a9 100644 --- a/src/app/components/NavBar.tsx +++ b/src/app/components/NavBar.tsx @@ -1,8 +1,9 @@ 'use client'; -import Link from 'next/link.js'; +import Link from 'next/link'; import { Fragment, useState } from 'react'; -import { Doc, DocsStructure } from '../types/types.js'; +import { themes, useThemeContext } from '../theme'; +import { Doc, DocsStructure } from '../types/types'; import styles from './NavBar.module.css'; function VersionsDropdown({ @@ -153,6 +154,9 @@ export default function NavBar({ }: { version: DocsStructure; }) { + const { theme } = useThemeContext(); + const themeStyles = themes[theme]; + const [isNavOpen, setIsNavOpen] = useState(false); @@ -161,7 +165,7 @@ export default function NavBar({ }; return ( -