From 84c433077bab712c7a8a4c0b3e4e3c72dc5a2c67 Mon Sep 17 00:00:00 2001 From: Vladyslav Dalechyn Date: Sat, 7 Sep 2024 22:36:24 +0300 Subject: [PATCH] fix: handle max min h w custom (#483) * fix: max/min height/width custom value handling * chore: changesets --- .changeset/violet-radios-confess.md | 5 +++++ src/ui/Box.tsx | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 .changeset/violet-radios-confess.md diff --git a/.changeset/violet-radios-confess.md b/.changeset/violet-radios-confess.md new file mode 100644 index 00000000..ccba8b17 --- /dev/null +++ b/.changeset/violet-radios-confess.md @@ -0,0 +1,5 @@ +--- +"frog": patch +--- + +Fixed an issue where min/max height/width would not handle custom values. diff --git a/src/ui/Box.tsx b/src/ui/Box.tsx index 23979ac4..e802c944 100644 --- a/src/ui/Box.tsx +++ b/src/ui/Box.tsx @@ -227,6 +227,10 @@ function getBoxProps({ 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) @@ -305,6 +309,10 @@ function getBoxProps({ marginBottom, marginLeft, marginRight, + maxHeight, + maxWidth, + minHeight, + minWidth, padding, paddingTop, paddingBottom,