Skip to content

Commit

Permalink
Improve speading syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Oct 29, 2022
1 parent f1f8951 commit 3bd1cd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/spacing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export function spacing(
"bottom": topBottom
};
})(),
...(params.top === undefined ? undefined : { "top": params.top }),
...(params.right === undefined ? undefined : { "right": params.right }),
...(params.bottom === undefined ? undefined : { "bottom": params.bottom }),
...(params.left === undefined ? undefined : { "left": params.left })
...(params.top !== undefined && { "top": params.top }),
...(params.right !== undefined && { "right": params.right }),
...(params.bottom !== undefined && { "bottom": params.bottom }),
...(params.left !== undefined && { "left": params.left })
};

(["top", "right", "bottom", "left"] as const).forEach(p => {
Expand Down

0 comments on commit 3bd1cd8

Please sign in to comment.