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

Gatsby browser JS imported component props ignored #180

Open
achchu93 opened this issue Jul 25, 2021 · 2 comments
Open

Gatsby browser JS imported component props ignored #180

achchu93 opened this issue Jul 25, 2021 · 2 comments

Comments

@achchu93
Copy link

header.js
const Header = () => (
  <header bg="font"></header>
)
gatsby-browser.js
import Header from './../src/components/Header'
const wrapRootElement = ({element}) => (
  <>
    <Header />
    {element}
  </>
)

When the Header component is imported to other places like pages or sub components it works. If we imported it to gatsby-browser.js the prop styles are ignored. Any specific config for that?

@achchu93
Copy link
Author

@arshad your help would appreciated!

@shadcn
Copy link
Contributor

shadcn commented Jul 29, 2021

@achchu93 I'll take a look at it. Honestly, been a while since I looked into Gatsby.

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