Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Theme is empty when importing component outside the Gatsby root #1479
I'm building a component library alongside a Gatsby demo website. The component library is styled with Emotion + theming.
Here is the basic folder structure I have:
My problem is that the button doesn't get the theme (the theme appears to be
However, if I move the button to
See repro here.
What am I missing here?
I'm having exactly the same issue trying to migrate to Emotion 10.
I built a UI library with Emotion 9 that is used by two Gatsby sites. The library was compiled with Rollup and additionally exported a theme object which both sites imported for their
Now with Emotion 10 the theme property received by the library components is empty. I've tried different combinations of emotion babel plugins/presets in my Rollup config as well as
I would really appreciate some advice on how to implement an emotion-based ui library that uses themes.
@Andarist was basically on the money. While I had