Jack Maclennan Portfolio
    Preparing search index...
    • Wraps the application in Next.js theme context, exposing the current theme and allowing the user to switch between dark, light and system.

              <ThemeProvider>
      <Page>{children}</Page>
      </ThemeProvider>

      Parameters

      • children: { children: ReactNode }

        The component tree to provide the theme to.

      Returns Element

      export default function ThemeProvider({ children }: { children: ReactNode }) {
      return (
      <NextThemeProvider attribute="class" defaultTheme="system" enableSystem>
      {children}
      </NextThemeProvider>
      );
      }