mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 05:34:15 +00:00
RN: Support flexWrap: 'wrap-reverse'
Reviewed By: fkgozali Differential Revision: D7684403 fbshipit-source-id: 6c247ba86b8ad1bb4dcc8f44f5609c939afe0f06
This commit is contained in:
parent
654435d1ed
commit
d69e55060f
@ -432,7 +432,8 @@ var LayoutPropTypes = {
|
||||
*/
|
||||
flexWrap: ReactPropTypes.oneOf([
|
||||
'wrap',
|
||||
'nowrap'
|
||||
'nowrap',
|
||||
'wrap-reverse'
|
||||
]),
|
||||
|
||||
/** `justifyContent` aligns children in the main direction.
|
||||
|
@ -57,7 +57,7 @@ export type ____LayoutStyle_Internal = $ReadOnly<{|
|
||||
borderTopWidth?: number,
|
||||
position?: 'absolute' | 'relative',
|
||||
flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse',
|
||||
flexWrap?: 'wrap' | 'nowrap',
|
||||
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse',
|
||||
justifyContent?:
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
|
@ -685,7 +685,8 @@ RCT_ENUM_CONVERTER(YGPositionType, (@{
|
||||
|
||||
RCT_ENUM_CONVERTER(YGWrap, (@{
|
||||
@"wrap": @(YGWrapWrap),
|
||||
@"nowrap": @(YGWrapNoWrap)
|
||||
@"nowrap": @(YGWrapNoWrap),
|
||||
@"wrap-reverse": @(YGWrapWrapReverse)
|
||||
}), YGWrapNoWrap, intValue)
|
||||
|
||||
RCT_ENUM_CONVERTER(RCTPointerEvents, (@{
|
||||
|
@ -315,6 +315,10 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
|
||||
setFlexWrap(YogaWrap.WRAP);
|
||||
break;
|
||||
}
|
||||
case "wrap-reverse": {
|
||||
setFlexWrap(YogaWrap.WRAP_REVERSE);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new JSApplicationIllegalArgumentException(
|
||||
"invalid value for flexWrap: " + flexWrap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user