Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am getting Warning: Failed prop type: Invalid prop error for GoogleFont #197

Open
ergunpp opened this issue Jan 13, 2019 · 1 comment
Open

Comments

@ergunpp
Copy link

ergunpp commented Jan 13, 2019

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 type function supplied to GoogleFont, expected object.
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
Copy link

Had a similar issue - downgrading to v0.16.18 helped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants