How to use custom fonts with Evergreen v5 #1163
-
Hi everyone, I'm struggling to figure out how to use the ThemeProvider to update the default font used by each component. I've read through this issue a couple times from 2019 #542 which is based on v4 and look at the theme docs for v5 from Github https://evergreen.segment.com/get-started/theming/. Currently I have something like this
typography components don't properly theme. Initially I thought it may have to do with the fontFamily used, and that Looking at the codesandbox found in the issue from 2019, https://codesandbox.io/s/04nxv61wmv?fontsize=14, the font does not get set with the proper fontFamily Am I missing something to have this properly work or is this not working atm? If so, what would be the proper way to set the fontFamily on all components? I could set the fontFamily every time I use a component, but that feels wrong 🤷♂️. I know there are some big theming changes coming in v6 so when that is released I will definitely upgrade to it, but currently there must be a way other individuals are using custom fonts with v5 Evergreen. Thanks in advance for any comments and help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try something like this, it worked for me
And then using the |
Beta Was this translation helpful? Give feedback.
Try something like this, it worked for me