Skip to content

Instantly share code, notes, and snippets.

@Kola92
Last active February 21, 2023 12:56
Show Gist options
  • Save Kola92/4bfa8e70e37e33015f079c6bba1d89f0 to your computer and use it in GitHub Desktop.
Save Kola92/4bfa8e70e37e33015f079c6bba1d89f0 to your computer and use it in GitHub Desktop.
Font
import { Inter, Open_Sans } from "@next/font/google";
// If loading a variable font, you don't need to specify the font weight
const inter = Inter({
subsets: ["latin"],
display: "swap",
});
// Non-variable font requires specifying the font weight
const openSans = Open_Sans({
subsets: ["latin"],
display: "swap",
weights: [300, 400, 500, 600, 700, 800],
style: ["normal", "italic"],
});
export default function RootLayout({ children }) {
return (
<html lang="en" className={inter ? inter.className : openSans.className}>
<body>{children}</body>
</html>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment