Skip to content

Using an Emotion theme with parent selectors #2854

Answered by Andarist
briefone asked this question in Q&A
Discussion options

You must be logged in to vote

You just need to merge your objects appropriately, if you spread them into a single object using spreads then only the last value for a given property will be preserved. This is how JavaScript works - it doesn't have to do anything with Emotion per see. If you use a deep merge then you can achieve what you want:
https://stackblitz.com/edit/react-ts-bjqxad?file=App.tsx

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@briefone
Comment options

Answer selected by srmagura
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants