Last active
February 21, 2023 12:56
-
-
Save Kola92/4bfa8e70e37e33015f079c6bba1d89f0 to your computer and use it in GitHub Desktop.
Font
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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