hub-api-playground / app /layout.tsx
enzostvs's picture
enzostvs HF Staff
add theme provider
91c3567
raw
history blame
779 Bytes
import { Fira_Code, Inter } from "next/font/google";
import { ThemeProvider } from "next-themes";
import "@/assets/globals.css";
import "highlight.js/styles/github.css";
import { Editor } from "@/components/editor";
const inter = Inter({
subsets: ["latin"],
display: "swap",
variable: "--font-inter",
});
const fira_code = Fira_Code({
subsets: ["latin"],
display: "swap",
variable: "--font-fira-code",
});
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" className={`${inter.variable} ${fira_code.variable}`}>
<body>
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
<Editor>{children}</Editor>
</ThemeProvider>
</body>
</html>
);
}