Closed dstollie closed 4 years ago
Probably related to #28 . Let me try this out with the current version and see if it works. Else need to update dependencies to latest versions.
I am having the same problem as well
Hi @dstollie,
This has been fixed via 59eb00f
In your above example, change the import statement
from
import styled from 'react-emotion'
to
import styled from '@emotion/styled'
and everything should work as expected.
Can be fixed by following the Migrating to Emotion 10 instructions
For our style guidelines I wanted to use this starter to have a solid base. Since this repository uses styled components and already implemented
emotion-themeing
. I though this was the perfect place to store our shared colors and fonts. Unfortunately emotion-theming doesn't seem to work and I don't really understand why it is not.How to reproduce
src/components/themeProvider.js
This is the place where the EmotionThemeProvider is being added. For simplicity reason I added a new ThemeProvider which has it's own theme.themeProvider.js
with the following contentsconst Button = styled("div")
background: ${props => props.theme.colors.primary};
;const theme = { colors: { primary: 'green' } };
export default function ThemeProvider({ children, location }) { return (
); }