Remove FlowFixMe from TextStylePropTypes

Reviewed By: zertosh

Differential Revision: D4160025

fbshipit-source-id: 330f731548bca830d4e3213f43608d2f3495ca57
This commit is contained in:
Pieter De Baets 2016-11-10 08:48:42 -08:00 committed by Facebook Github Bot
parent 5aad13b691
commit 9e61473172

View File

@ -11,25 +11,22 @@
*/
'use strict';
var ReactPropTypes = require('React').PropTypes;
var ColorPropType = require('ColorPropType');
var ViewStylePropTypes = require('ViewStylePropTypes');
const ReactPropTypes = require('React').PropTypes;
const ColorPropType = require('ColorPropType');
const ViewStylePropTypes = require('ViewStylePropTypes');
const TextStylePropTypes = {
...ViewStylePropTypes,
// TODO: use spread instead of Object.assign/create after #6560135 is fixed
var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), {
color: ColorPropType,
// $FlowFixMe(>=0.34.0)
fontFamily: ReactPropTypes.string,
// $FlowFixMe(>=0.34.0)
fontSize: ReactPropTypes.number,
// $FlowFixMe(>=0.34.0)
fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
/**
* Specifies font weight. The values 'normal' and 'bold' are supported for
* most fonts. Not all fonts have a variant for each of the numeric values,
* in that case the closest one is chosen.
*/
// $FlowFixMe(>=0.34.0)
fontWeight: ReactPropTypes.oneOf(
['normal' /*default*/, 'bold',
'100', '200', '300', '400', '500', '600', '700', '800', '900']
@ -37,7 +34,6 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), {
/**
* @platform ios
*/
// $FlowFixMe(>=0.34.0)
fontVariant: ReactPropTypes.arrayOf(
ReactPropTypes.oneOf([
'small-caps',
@ -47,43 +43,35 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), {
'proportional-nums',
])
),
// $FlowFixMe(>=0.34.0)
textShadowOffset: ReactPropTypes.shape(
{width: ReactPropTypes.number, height: ReactPropTypes.number}
),
// $FlowFixMe(>=0.34.0)
textShadowRadius: ReactPropTypes.number,
textShadowColor: ColorPropType,
/**
* @platform ios
*/
// $FlowFixMe(>=0.34.0)
letterSpacing: ReactPropTypes.number,
// $FlowFixMe(>=0.34.0)
lineHeight: ReactPropTypes.number,
/**
* Specifies text alignment. The value 'justify' is only supported on iOS and
* fallbacks to `left` on Android.
*/
// $FlowFixMe(>=0.34.0)
textAlign: ReactPropTypes.oneOf(
['auto' /*default*/, 'left', 'right', 'center', 'justify']
),
/**
* @platform android
*/
// $FlowFixMe(>=0.34.0)
textAlignVertical: ReactPropTypes.oneOf(
['auto' /*default*/, 'top', 'bottom', 'center']
),
// $FlowFixMe(>=0.34.0)
textDecorationLine: ReactPropTypes.oneOf(
['none' /*default*/, 'underline', 'line-through', 'underline line-through']
),
/**
* @platform ios
*/
// $FlowFixMe(>=0.34.0)
textDecorationStyle: ReactPropTypes.oneOf(
['solid' /*default*/, 'double', 'dotted','dashed']
),
@ -94,10 +82,9 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), {
/**
* @platform ios
*/
// $FlowFixMe(>=0.34.0)
writingDirection: ReactPropTypes.oneOf(
['auto' /*default*/, 'ltr', 'rtl']
),
});
};
module.exports = TextStylePropTypes;