Skip to content

Commit

Permalink
feat: Add specific padding to boundaries (floating-ui#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
Buchheit committed Apr 12, 2018
1 parent 03f45cd commit ce85548
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/popper/src/utils/getBoundaries.js
Expand Up @@ -69,10 +69,10 @@ export default function getBoundaries(
}

// Add paddings
boundaries.left += padding;
boundaries.top += padding;
boundaries.right -= padding;
boundaries.bottom -= padding;
boundaries.left += padding.left || padding;
boundaries.top += padding.top || padding;
boundaries.right -= padding.right || padding;
boundaries.bottom -= padding.bottom || padding;

return boundaries;
}

0 comments on commit ce85548

Please sign in to comment.