orfium-ictinus
orfium-ictinus copied to clipboard
Passing theme in emotion styled component versioning problem
Describe the bug When the latest version of @emotion/styled is used, the theme is not passed in the children components
To Reproduce Steps to reproduce the behavior:
- Use
@emotion/styled: "^11.0.0"
and@orfium/ictinus": "^1.5.0"
- Wrap your app with the ictinus theme provider
<IctinusThemeProvider > ... </IctinusThemeProvider>
- Try to use the Ictinus theme in a styled component eg
fill: ${props => props.theme.utils.getColor("mint", 400)};
- You will get an error since theme is an empty object.
Expected behavior We should be able to use the Ictinus theme in a styled component since we pass it through the ictinus theme provider.
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu 20.04
- Browser: Google Chrome Version 87.0.4280.88 (Official Build) (64-bit)
Additional context
It works properly with "@emotion/styled": "^10.0.27"
because the theme is visible in the styled components.