Skip to content

Commit 1e14e33

Browse files
authored
Merge pull request #16 from dev-five-git/box-sizing-prop
Add boxSizing prop
2 parents eedfe69 + 7bde1f2 commit 1e14e33

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.changeset/brave-sloths-warn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@devup-ui/react": patch
3+
"@devup-ui/wasm": patch
4+
---
5+
6+
Add boxSizing prop

libs/css/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static GLOBAL_STYLE_PROPERTY: Lazy<Mutex<HashMap<&str, PropertyType>>> = Lazy::n
5959
("my", ["margin-top", "margin-bottom"]),
6060
("px", ["padding-left", "padding-right"]),
6161
("py", ["padding-top", "padding-bottom"]),
62+
("boxSize", ["width", "height"]),
6263
] {
6364
map.insert(key, value.into());
6465
}

packages/react/src/types/props/box-sizing.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ export interface DevupUiBoxSizingProps {
2424
minH?: ResponsiveValue<Property.MinHeight>
2525
minW?: ResponsiveValue<Property.MinWidth>
2626
w?: ResponsiveValue<Property.Width>
27+
28+
// width and height
29+
boxSize?: ResponsiveValue<Property.Width | Property.Height>
2730
}

0 commit comments

Comments
 (0)