Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
added optional default offset based on border width
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Abe committed Jan 26, 2020
1 parent 39cace4 commit 9ebfaa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/components/Box/index.jsx
Expand Up @@ -46,10 +46,10 @@ const Box = ({ children, setup }) => {
background: {
backgroundColor: backgroundColor || undefined,
position: 'absolute',
top: backgroundOffset.top ?? 0,
right: backgroundOffset.right ?? 0,
bottom: backgroundOffset.bottom ?? 0,
left: backgroundOffset.left ?? 0,
top: backgroundOffset.top ?? N.height ?? 0,
right: backgroundOffset.right ?? E.width ?? 0,
bottom: backgroundOffset.bottom ?? S.height ?? 0,
left: backgroundOffset.left ?? W.width ?? 0,
},
posN: {
...base.pos,
Expand Down
6 changes: 0 additions & 6 deletions src/scenes/ScenePlayground.jsx
Expand Up @@ -13,12 +13,6 @@ const setupOffset = {
height: 160,
margin: 0,
backgroundColor: '#ddd',
backgroundOffset: {
top: 30,
right: 30,
bottom: 30,
left: 30,
},
N: {
id: 'N',
height: 20,
Expand Down

0 comments on commit 9ebfaa6

Please sign in to comment.