Add baseline alignment support

Summary:
Add baseline alignment support to react native.

{F65372439}

```
class Playground extends React.Component {
  render() {
    return (
      <View style={{padding: 30, flexDirection: 'row', alignItems: 'baseline'}}>
        <View style={{width: 30, height: 10, backgroundColor: 'red'}}/>
        <View style={{width: 30, height: 20, backgroundColor: 'green'}}/>
        <View style={{width: 30, height: 30, backgroundColor: 'blue'}}/>
      </View>
    );
  }
}
```

Reviewed By: javache

Differential Revision: D4385099

fbshipit-source-id: d7caa6e4c086c4a62e24ef1d5db9c805c470ef2a
This commit is contained in:
Emil Sjolander 2017-01-08 04:34:43 -08:00 committed by Facebook Github Bot
parent e3c8d80b3c
commit 976abf87f2
2 changed files with 6 additions and 3 deletions

View File

@ -311,7 +311,8 @@ var LayoutPropTypes = {
'flex-start', 'flex-start',
'flex-end', 'flex-end',
'center', 'center',
'stretch' 'stretch',
'baseline'
]), ]),
/** `alignSelf` controls how a child aligns in the cross direction, /** `alignSelf` controls how a child aligns in the cross direction,
@ -325,7 +326,8 @@ var LayoutPropTypes = {
'flex-start', 'flex-start',
'flex-end', 'flex-end',
'center', 'center',
'stretch' 'stretch',
'baseline'
]), ]),
/** `overflow` controls how a children are measured and displayed. /** `overflow` controls how a children are measured and displayed.

View File

@ -640,7 +640,8 @@ RCT_ENUM_CONVERTER(YGAlign, (@{
@"flex-end": @(YGAlignFlexEnd), @"flex-end": @(YGAlignFlexEnd),
@"center": @(YGAlignCenter), @"center": @(YGAlignCenter),
@"auto": @(YGAlignAuto), @"auto": @(YGAlignAuto),
@"stretch": @(YGAlignStretch) @"stretch": @(YGAlignStretch),
@"baseline": @(YGAlignBaseline)
}), YGAlignFlexStart, intValue) }), YGAlignFlexStart, intValue)
RCT_ENUM_CONVERTER(YGPositionType, (@{ RCT_ENUM_CONVERTER(YGPositionType, (@{