diff --git a/Examples/UIExplorer/LayoutExample.js b/Examples/UIExplorer/LayoutExample.js index e60ff89c776..6d1095ae527 100644 --- a/Examples/UIExplorer/LayoutExample.js +++ b/Examples/UIExplorer/LayoutExample.js @@ -29,11 +29,12 @@ var UIExplorerPage = require('./UIExplorerPage'); var Circle = React.createClass({ render: function() { var size = this.props.size || 20; + var backgroundColor = this.props.bgColor || '#527fe4'; return ( , + , + , + , + + ]; + return ( row - + {fiveColoredCircles} + + row-reverse + + {fiveColoredCircles} column - + {fiveColoredCircles} + + column-reverse + + {fiveColoredCircles} {'top: 15, left: 160'} @@ -88,23 +105,23 @@ var LayoutExample = React.createClass({ flex-start - + {fiveColoredCircles} center - + {fiveColoredCircles} flex-end - + {fiveColoredCircles} space-between - + {fiveColoredCircles} space-around - + {fiveColoredCircles} diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png index 2c657345393..90558447391 100644 Binary files a/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png and b/Examples/UIExplorer/UIExplorerIntegrationTests/ReferenceImages/Examples-UIExplorer-UIExplorerApp.ios/testLayoutExample_1@2x.png differ diff --git a/Libraries/StyleSheet/LayoutPropTypes.js b/Libraries/StyleSheet/LayoutPropTypes.js index a07e16fe2f9..558cd447ba6 100644 --- a/Libraries/StyleSheet/LayoutPropTypes.js +++ b/Libraries/StyleSheet/LayoutPropTypes.js @@ -60,7 +60,9 @@ var LayoutPropTypes = { // https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction flexDirection: ReactPropTypes.oneOf([ 'row', - 'column' + 'row-reverse', + 'column', + 'column-reverse' ]), // https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index 73f41000f08..917a5b627de 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -816,7 +816,9 @@ RCT_ENUM_CONVERTER(css_clip_t, (@{ RCT_ENUM_CONVERTER(css_flex_direction_t, (@{ @"row": @(CSS_FLEX_DIRECTION_ROW), - @"column": @(CSS_FLEX_DIRECTION_COLUMN) + @"row-reverse": @(CSS_FLEX_DIRECTION_ROW_REVERSE), + @"column": @(CSS_FLEX_DIRECTION_COLUMN), + @"column-reverse": @(CSS_FLEX_DIRECTION_COLUMN_REVERSE) }), CSS_FLEX_DIRECTION_COLUMN, intValue) RCT_ENUM_CONVERTER(css_justify_t, (@{ diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java index 97d83ea143d..2660337e517 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java @@ -60,7 +60,7 @@ public class LayoutShadowNode extends ReactShadowNode { public void setFlexDirection(@Nullable String flexDirection) { setFlexDirection( flexDirection == null ? CSSFlexDirection.COLUMN : CSSFlexDirection.valueOf( - flexDirection.toUpperCase(Locale.US))); + flexDirection.toUpperCase(Locale.US).replace("-", "_"))); } @ReactProp(name = ViewProps.FLEX_WRAP)