Skip to content

Commit

Permalink
fix: handle max min h w custom (#483)
Browse files Browse the repository at this point in the history
* fix: max/min height/width custom value handling

* chore: changesets
  • Loading branch information
dalechyn authored Sep 7, 2024
1 parent 628178f commit 84c4330
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-radios-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frog": patch
---

Fixed an issue where min/max height/width would not handle custom values.
8 changes: 8 additions & 0 deletions src/ui/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ function getBoxProps<vars extends Vars>({
const marginBottom = resolveUnitToken(units, rest.marginBottom, vmax)
const marginLeft = resolveUnitToken(units, rest.marginLeft, vmax)
const marginRight = resolveUnitToken(units, rest.marginRight, vmax)
const maxHeight = resolveUnitToken(units, rest.maxHeight, vmax)
const maxWidth = resolveUnitToken(units, rest.maxWidth, vmax)
const minHeight = resolveUnitToken(units, rest.minHeight, vmax)
const minWidth = resolveUnitToken(units, rest.minWidth, vmax)
const padding = resolveUnitToken(units, rest.padding, vmax)
const paddingTop = resolveUnitToken(units, rest.paddingTop, vmax)
const paddingBottom = resolveUnitToken(units, rest.paddingBottom, vmax)
Expand Down Expand Up @@ -305,6 +309,10 @@ function getBoxProps<vars extends Vars>({
marginBottom,
marginLeft,
marginRight,
maxHeight,
maxWidth,
minHeight,
minWidth,
padding,
paddingTop,
paddingBottom,
Expand Down

0 comments on commit 84c4330

Please sign in to comment.