Having trouble setting negative margins #1241
-
I am creating a compomnent that takes a space value as a prop
I then want that value translated into a negative value for
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
@danchristian , one way would be to use a function resolver for the property:
full cs: https://codesandbox.io/s/goofy-cache-9wwri?file=/src/components/Columns.js |
Beta Was this translation helpful? Give feedback.
-
@danchristian get is a utility function for accessing the theme keys -in your example the spaces are in theme.space You can also use the theme object directly, something like:
|
Beta Was this translation helpful? Give feedback.
-
@atanasster Hey, one last question on this. I've had trouble getting responsive margins working with the get utility function. So I can now do |
Beta Was this translation helpful? Give feedback.
@danchristian , one way would be to use a function resolver for the property:
full cs: https://codesandbox.io/s/goofy-cache-9wwri?file=/src/components/Columns.js