orfium-ictinus icon indicating copy to clipboard operation
orfium-ictinus copied to clipboard

Passing theme in emotion styled component versioning problem

Open NikosCha opened this issue 4 years ago • 0 comments

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:

  1. Use @emotion/styled: "^11.0.0" and @orfium/ictinus": "^1.5.0"
  2. Wrap your app with the ictinus theme provider <IctinusThemeProvider > ... </IctinusThemeProvider>
  3. Try to use the Ictinus theme in a styled component eg fill: ${props => props.theme.utils.getColor("mint", 400)};
  4. 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 image image

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.

NikosCha avatar Dec 08 '20 12:12 NikosCha