- Notifications
You must be signed in to change notification settings - Fork 673
Description
Describe the bug
Using theme-ui's provider ThemeProvider and following the styled documentation, I'm unable to get access to the theme in the styled context.
To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/themeui-context-sharing-jhsto?file=/src/App.js
This code sandbox is passing a theme object to the theme-ui ThemeProvider. I'm stringifying the theme context provided by @emotion's useTheme hook and theme-ui's useThemeUI hook. The theme object @emotion returns is empty, but theme-ui has the object.
Expected behavior
@emotion's styled API should have access to the theme object passed to the theme-ui ThemeProvider.
Additional context
I understand that a simple solution is wrapping the two individual ThemeProviders, but it would be preferable to just have the one.
