-
I have an emotion theme like this:
and using it like: In this case the margin prop:
instead of:
or
Is there anyway to get this to work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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: |
Beta Was this translation helpful? Give feedback.
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