From 976abf87f213eb3a05277a9956b5e582ba951a2c Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Sun, 8 Jan 2017 04:34:43 -0800 Subject: [PATCH] Add baseline alignment support Summary: Add baseline alignment support to react native. {F65372439} ``` class Playground extends React.Component { render() { return ( ); } } ``` Reviewed By: javache Differential Revision: D4385099 fbshipit-source-id: d7caa6e4c086c4a62e24ef1d5db9c805c470ef2a --- Libraries/StyleSheet/LayoutPropTypes.js | 6 ++++-- React/Base/RCTConvert.m | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Libraries/StyleSheet/LayoutPropTypes.js b/Libraries/StyleSheet/LayoutPropTypes.js index 2d4f99319..95bb430a8 100644 --- a/Libraries/StyleSheet/LayoutPropTypes.js +++ b/Libraries/StyleSheet/LayoutPropTypes.js @@ -311,7 +311,8 @@ var LayoutPropTypes = { 'flex-start', 'flex-end', 'center', - 'stretch' + 'stretch', + 'baseline' ]), /** `alignSelf` controls how a child aligns in the cross direction, @@ -325,7 +326,8 @@ var LayoutPropTypes = { 'flex-start', 'flex-end', 'center', - 'stretch' + 'stretch', + 'baseline' ]), /** `overflow` controls how a children are measured and displayed. diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index 01ee6ba96..4036be600 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -640,7 +640,8 @@ RCT_ENUM_CONVERTER(YGAlign, (@{ @"flex-end": @(YGAlignFlexEnd), @"center": @(YGAlignCenter), @"auto": @(YGAlignAuto), - @"stretch": @(YGAlignStretch) + @"stretch": @(YGAlignStretch), + @"baseline": @(YGAlignBaseline) }), YGAlignFlexStart, intValue) RCT_ENUM_CONVERTER(YGPositionType, (@{