mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 17:22:45 +08:00
[react-native] Use SpreadProperty to make react-docgen happy
This commit is contained in:
@@ -8,25 +8,22 @@
|
||||
var ReactPropTypes = require('ReactPropTypes');
|
||||
var ViewStylePropTypes = require('ViewStylePropTypes');
|
||||
|
||||
var merge = require('merge');
|
||||
|
||||
var TextStylePropTypes = merge(
|
||||
ViewStylePropTypes, {
|
||||
fontFamily: ReactPropTypes.string,
|
||||
fontSize: ReactPropTypes.number,
|
||||
fontWeight: ReactPropTypes.oneOf(['normal' /*default*/, 'bold']),
|
||||
fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
|
||||
lineHeight: ReactPropTypes.number,
|
||||
color: ReactPropTypes.string,
|
||||
containerBackgroundColor: ReactPropTypes.string,
|
||||
textAlign: ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'left', 'right', 'center']
|
||||
),
|
||||
writingDirection: ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'ltr', 'rtl']
|
||||
),
|
||||
}
|
||||
);
|
||||
var TextStylePropTypes = {
|
||||
...ViewStylePropTypes,
|
||||
fontFamily: ReactPropTypes.string,
|
||||
fontSize: ReactPropTypes.number,
|
||||
fontWeight: ReactPropTypes.oneOf(['normal' /*default*/, 'bold']),
|
||||
fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
|
||||
lineHeight: ReactPropTypes.number,
|
||||
color: ReactPropTypes.string,
|
||||
containerBackgroundColor: ReactPropTypes.string,
|
||||
textAlign: ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'left', 'right', 'center']
|
||||
),
|
||||
writingDirection: ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'ltr', 'rtl']
|
||||
),
|
||||
};
|
||||
|
||||
// Text doesn't support padding correctly (#4841912)
|
||||
var unsupportedProps = Object.keys({
|
||||
|
||||
Reference in New Issue
Block a user