Prettier React Native Libraries

Reviewed By: sahrens

Differential Revision: D7961488

fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
This commit is contained in:
Eli White
2018-05-10 19:06:46 -07:00
committed by Facebook Github Bot
parent 1e2de71290
commit d01ab66b47
301 changed files with 6259 additions and 3781 deletions

View File

@@ -4,8 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ColorPropType = require('ColorPropType');
@@ -24,10 +26,19 @@ const TextStylePropTypes = {
* most fonts. Not all fonts have a variant for each of the numeric values,
* in that case the closest one is chosen.
*/
fontWeight: ReactPropTypes.oneOf(
['normal' /*default*/, 'bold',
'100', '200', '300', '400', '500', '600', '700', '800', '900']
),
fontWeight: ReactPropTypes.oneOf([
'normal' /*default*/,
'bold',
'100',
'200',
'300',
'400',
'500',
'600',
'700',
'800',
'900',
]),
/**
* @platform ios
*/
@@ -38,11 +49,12 @@ const TextStylePropTypes = {
'lining-nums',
'tabular-nums',
'proportional-nums',
])
),
textShadowOffset: ReactPropTypes.shape(
{width: ReactPropTypes.number, height: ReactPropTypes.number}
]),
),
textShadowOffset: ReactPropTypes.shape({
width: ReactPropTypes.number,
height: ReactPropTypes.number,
}),
textShadowRadius: ReactPropTypes.number,
textShadowColor: ColorPropType,
/**
@@ -54,15 +66,22 @@ const TextStylePropTypes = {
* Specifies text alignment. The value 'justify' is only supported on iOS and
* fallbacks to `left` on Android.
*/
textAlign: ReactPropTypes.oneOf(
['auto' /*default*/, 'left', 'right', 'center', 'justify']
),
textAlign: ReactPropTypes.oneOf([
'auto' /*default*/,
'left',
'right',
'center',
'justify',
]),
/**
* @platform android
*/
textAlignVertical: ReactPropTypes.oneOf(
['auto' /*default*/, 'top', 'bottom', 'center']
),
textAlignVertical: ReactPropTypes.oneOf([
'auto' /*default*/,
'top',
'bottom',
'center',
]),
/**
* Set to `false` to remove extra font padding intended to make space for certain ascenders / descenders.
* With some fonts, this padding can make text look slightly misaligned when centered vertically.
@@ -70,15 +89,21 @@ const TextStylePropTypes = {
* @platform android
*/
includeFontPadding: ReactPropTypes.bool,
textDecorationLine: ReactPropTypes.oneOf(
['none' /*default*/, 'underline', 'line-through', 'underline line-through']
),
textDecorationLine: ReactPropTypes.oneOf([
'none' /*default*/,
'underline',
'line-through',
'underline line-through',
]),
/**
* @platform ios
*/
textDecorationStyle: ReactPropTypes.oneOf(
['solid' /*default*/, 'double', 'dotted','dashed']
),
textDecorationStyle: ReactPropTypes.oneOf([
'solid' /*default*/,
'double',
'dotted',
'dashed',
]),
/**
* @platform ios
*/
@@ -86,15 +111,16 @@ const TextStylePropTypes = {
/**
* @platform ios
*/
textTransform: ReactPropTypes.oneOf(
['none' /*default*/, 'capitalize', 'uppercase', 'lowercase']
),
textTransform: ReactPropTypes.oneOf([
'none' /*default*/,
'capitalize',
'uppercase',
'lowercase',
]),
/**
* @platform ios
*/
writingDirection: ReactPropTypes.oneOf(
['auto' /*default*/, 'ltr', 'rtl']
),
writingDirection: ReactPropTypes.oneOf(['auto' /*default*/, 'ltr', 'rtl']),
};
module.exports = TextStylePropTypes;