Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
8cab2595
Commit
8cab2595
authored
Jun 10, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add font in theme config
parent
8ab8cf0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
_app.tsx
pages/_app.tsx
+2
-1
_document.tsx
pages/_document.tsx
+23
-0
fonts.ts
theme/fonts.ts
+8
-0
index.ts
theme/index.ts
+9
-0
No files found.
pages/_app.tsx
View file @
8cab2595
import
React
from
'
react
'
;
import
type
{
AppProps
}
from
'
next/app
'
;
import
{
ChakraProvider
}
from
'
@chakra-ui/react
'
;
import
theme
from
'
../theme/index
'
;
function
MyApp
({
Component
,
pageProps
}:
AppProps
)
{
return
(
<
ChakraProvider
>
<
ChakraProvider
theme=
{
theme
}
>
<
Component
{
...
pageProps
}
/>
</
ChakraProvider
>
);
...
...
pages/_document.tsx
0 → 100644
View file @
8cab2595
import
React
from
'
react
'
;
import
Document
,
{
Html
,
Head
,
Main
,
NextScript
}
from
'
next/document
'
class
MyDocument
extends
Document
{
render
()
{
return
(
<
Html
>
<
Head
>
<
link
href=
"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
rel=
"stylesheet"
/>
</
Head
>
<
body
>
<
Main
/>
<
NextScript
/>
</
body
>
</
Html
>
)
}
}
export
default
MyDocument
theme/fonts.ts
0 → 100644
View file @
8cab2595
import
{
theme
}
from
'
@chakra-ui/react
'
;
const
fonts
=
{
heading
:
`Inter,
${
theme
.
fonts
.
heading
}
`
,
body
:
`Inter,
${
theme
.
fonts
.
body
}
`
,
}
export
default
fonts
;
theme/index.ts
0 → 100644
View file @
8cab2595
import
{
extendTheme
}
from
'
@chakra-ui/react
'
;
import
fonts
from
'
./fonts
'
;
const
overrides
=
{
fonts
,
}
export
default
extendTheme
(
overrides
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment