forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
with-google-fonts.js
32 lines (29 loc) · 954 Bytes
/
with-google-fonts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Fraunces, Indie_Flower, Roboto } from '@next/font/google'
const indieFlower = Indie_Flower({ weight: '400', preload: false })
const fraunces = Fraunces({ weight: '400', preload: false })
const robotoMultiple = Roboto({
weight: ['900', '100'],
style: ['normal', 'italic'],
})
const frauncesMultiple = Fraunces({
style: ['italic', 'normal'],
axes: ['SOFT', 'WONK', 'opsz'],
})
export default function WithFonts() {
return (
<>
<div id="first-google-font" className={indieFlower.className}>
{JSON.stringify(indieFlower)}
</div>
<div id="second-google-font" className={fraunces.className}>
{JSON.stringify(fraunces)}
</div>
<div id="multiple-roboto" className={robotoMultiple.className}>
{JSON.stringify(robotoMultiple)}
</div>
<div id="multiple-fraunces" className={frauncesMultiple.className}>
{JSON.stringify(frauncesMultiple)}
</div>
</>
)
}