File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
packages/ui-flex/src/Flex/Item Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,9 @@ type FlexItemOwnProps = {
113113 /**
114114 * Specifies the order of the `Flex.Item` inside the `Flex` component.
115115 *
116- * Items with the same order revert to source order.
117- *
118- * Utilizes the order flex CSS property. Default order CSS value is 0.
116+ * Utilizes the order flex CSS property.
119117 */
120- order ?: string | number
118+ order ?: number
121119}
122120
123121type PropKeys = keyof FlexItemOwnProps
@@ -145,7 +143,7 @@ const propTypes: PropValidators<PropKeys> = {
145143 shouldShrink : PropTypes . bool ,
146144 size : PropTypes . string ,
147145 withVisualDebug : PropTypes . bool ,
148- order : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
146+ order : PropTypes . number
149147}
150148
151149const allowedProps : AllowedPropKeys = [
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const generateStyle = (
5353 boxSizing : 'border-box' ,
5454 minWidth : '0.0625rem' ,
5555 flexBasis : size ,
56- ...( order !== undefined && { order } ) ,
56+ ...( order !== undefined ? { order } : { } ) ,
5757 // initial value is 1, but we want 0 as our default,
5858 // so users can opt in to shrink like they do grow
5959 flexShrink : shouldShrink ? 1 : 0 ,
You can’t perform that action at this time.
0 commit comments