Permalink
Browse files

RN: Support `flexWrap: 'wrap-reverse'`

Reviewed By: fkgozali

Differential Revision: D7684403

fbshipit-source-id: 6c247ba86b8ad1bb4dcc8f44f5609c939afe0f06
  • Loading branch information...
yungsters authored and facebook-github-bot committed Apr 19, 2018
1 parent 654435d commit d69e55060fd76d91eccc45905d250a9fce4b2c49
@@ -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'
View
@@ -685,7 +685,8 @@ + (NSPropertyList)NSPropertyList:(id)json
RCT_ENUM_CONVERTER(YGWrap, (@{
@"wrap": @(YGWrapWrap),
@"nowrap": @(YGWrapNoWrap)
@"nowrap": @(YGWrapNoWrap),
@"wrap-reverse": @(YGWrapWrapReverse)
}), YGWrapNoWrap, intValue)
RCT_ENUM_CONVERTER(RCTPointerEvents, (@{
@@ -315,6 +315,10 @@ public void setFlexWrap(@Nullable String flexWrap) {
setFlexWrap(YogaWrap.WRAP);
break;
}
case "wrap-reverse": {
setFlexWrap(YogaWrap.WRAP_REVERSE);
break;
}
default: {
throw new JSApplicationIllegalArgumentException(
"invalid value for flexWrap: " + flexWrap);

0 comments on commit d69e550

Please sign in to comment.