Skip to content

Commit

Permalink
handle 0 for margin values (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp authored May 11, 2020
1 parent dd5c06f commit 199532b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-ui/src/primitives/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ function Element(
const margins = { margin: 0 }
// because of the above reset, we have to manually handle overrides
marginProps.map(m => {
if (props[m]) margins[m] = props[m]
if (themeStyles[m]) margins[m] = themeStyles[m]
if (css[m]) margins[m] = css[m]
if (typeof themeStyles[m] !== 'undefined') margins[m] = themeStyles[m]
if (typeof css[m] !== 'undefined') margins[m] = css[m]
if (typeof props[m] !== 'undefined') margins[m] = props[m]
delete props[m]
delete themeStyles[m]
delete css[m]
Expand Down

1 comment on commit 199532b

@vercel
Copy link

@vercel vercel bot commented on 199532b May 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.