Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle max min h w custom #483

Merged
merged 2 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading