mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
0b09ed0667
- [react-packager] transformModulePath option is not actually required | Amjad Masad - Implement TextInput.clearButtonMode added by D1875684 on OSS fork + example | Tadeu Zagallo - [ReactNative] Use local CocoaPod config for ReactNative modules | Spencer Ahrens - [ReactNative] Pull out some OSS modules into separate libs | Spencer Ahrens - Enqueue events at 60fps + profiling helpers | Tadeu Zagallo
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
*
|
|
* @providesModule TextStylePropTypes
|
|
*/
|
|
'use strict';
|
|
|
|
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']
|
|
),
|
|
}
|
|
);
|
|
|
|
// Text doesn't support padding correctly (#4841912)
|
|
var unsupportedProps = Object.keys({
|
|
padding: null,
|
|
paddingTop: null,
|
|
paddingLeft: null,
|
|
paddingRight: null,
|
|
paddingBottom: null,
|
|
paddingVertical: null,
|
|
paddingHorizontal: null,
|
|
});
|
|
|
|
for (var key in unsupportedProps) {
|
|
delete TextStylePropTypes[key];
|
|
}
|
|
|
|
module.exports = TextStylePropTypes;
|