I am getting Warning: Failed prop type: Invalid prop error for GoogleFont
ergunpp opened this issue · 1 comments
ergunpp commented
Hi,
I am trying to setup typography for my gatsbyjs project with the following code:
import Typography from 'typography'
const typography = new Typography({
headerFontFamily: ['Allura','cursive'],
bodyFontFamily: ['Open Sans','sans serif'],
googleFonts: [
{
name: 'Allura',
styles: ['400'],
subsets:['latin-ext'],
},
{
name: 'Open Sans',
styles: ['300','400','600'],
subsets: ['latin-ext']
},
],
})
export default typography
I am receiving a Warning on compile:
Warning: Failed prop type: Invalid prop
typography
of typefunction
supplied toGoogleFont
, expectedobject
.
in GoogleFont
And when navigating homepage on browser I get the following error:
Unhandled Rejection (TypeError): typography.injectStyles is not a function
Couldn't figure out a solution. Would appreciate urgent help. Thank you in advance folks!
VladimirCatrici commented
Had a similar issue - downgrading to v0.16.18 helped