File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
polaris-react/src/components/Box Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @shopify/polaris ' : minor
3+ ---
4+
5+ Added support for ` minHeight ` and ` minWidth ` on ` Box `
Original file line number Diff line number Diff line change 1111 --pc-box-border-right : initial ;
1212 --pc-box-border-top : initial ;
1313 --pc-box-color : initial ;
14+ --pc-box-min-height : initial ;
15+ --pc-box-min-width : initial ;
1416 --pc-box-max-width : initial ;
1517 --pc-box-overflow-x : initial ;
1618 --pc-box-overflow-y : initial ;
3032 border-right : var (--pc-box-border-right );
3133 border-top : var (--pc-box-border-top );
3234 color : var (--pc-box-color );
35+ min-height : var (--pc-box-min-height );
36+ min-width : var (--pc-box-min-width );
3337 max-width : var (--pc-box-max-width );
3438 overflow-x : var (--pc-box-overflow-x );
3539 overflow-y : var (--pc-box-overflow-y );
Original file line number Diff line number Diff line change @@ -164,6 +164,10 @@ export interface BoxProps extends PropsWithChildren {
164164 color ?: ColorTokenScale ;
165165 /** HTML id attribute */
166166 id ?: string ;
167+ /** Set minimum height of container */
168+ minHeight ?: string ;
169+ /** Set minimum width of container */
170+ minWidth ?: string ;
167171 /** Set maximum width of container */
168172 maxWidth ?: string ;
169173 /** Clip horizontal content of children */
@@ -204,6 +208,8 @@ export const Box = forwardRef<HTMLElement, BoxProps>(
204208 children,
205209 color,
206210 id,
211+ minHeight,
212+ minWidth,
207213 maxWidth,
208214 overflowX,
209215 overflowY,
@@ -269,6 +275,8 @@ export const Box = forwardRef<HTMLElement, BoxProps>(
269275 '--pc-box-border-radius-top-right' : borderRadiuses . topRight
270276 ? `var(--p-border-radius-${ borderRadiuses . topRight } )`
271277 : undefined ,
278+ '--pc-box-min-height' : minHeight ?? undefined ,
279+ '--pc-box-min-width' : minWidth ?? undefined ,
272280 '--pc-box-max-width' : maxWidth ?? undefined ,
273281 '--pc-box-overflow-x' : overflowX ?? undefined ,
274282 '--pc-box-overflow-y' : overflowY ?? undefined ,
You can’t perform that action at this time.
0 commit comments