Browse files

Fixing misuses of the Text type

Reviewed By: fkgozali

Differential Revision: D7227752

fbshipit-source-id: 3577c86b416a7c04190063243839e98e2a80ec7f
  • Loading branch information...
TheSavior authored and facebook-github-bot committed Mar 11, 2018
1 parent cd8128b commit 3fd82d3c89f2d7e5103b024b54250f2ded970d88
Showing with 24 additions and 18 deletions.
  1. +24 −18 Libraries/Text/TextProps.js
@@ -13,8 +13,8 @@
import type {Node} from 'react';
import type {LayoutEvent} from 'CoreEventTypes';
import type {TextStyleProp} from 'StyleSheet';
import type {LayoutEvent, PressEvent} from 'CoreEventTypes';
import type {DangerouslyImpreciseStyleProp} from 'StyleSheet';
type PressRetentionOffset = {
top: number,
@@ -26,28 +26,34 @@ type PressRetentionOffset = {
* @see
export type TextProps = {|
accessible?: boolean,
allowFontScaling?: boolean,
export type TextProps = $ReadOnly<{
accessible?: ?boolean,
allowFontScaling?: ?boolean,
children?: Node,
ellipsizeMode?: 'clip' | 'head' | 'middle' | 'tail',
nativeID?: string,
numberOfLines?: number,
onLayout?: ?(event: LayoutEvent) => void,
onLongPress?: ?() => void,
onPress?: ?() => void,
pressRetentionOffset?: PressRetentionOffset,
selectable?: boolean,
style?: TextStyleProp,
numberOfLines?: ?number,
onLayout?: ?(event: LayoutEvent) => mixed,
onLongPress?: ?(event: PressEvent) => mixed,
onPress?: ?(event: PressEvent) => mixed,
onResponderGrant?: ?Function,
onResponderMove?: ?Function,
onResponderRelease?: ?Function,
onResponderTerminate?: ?Function,
onResponderTerminationRequest?: ?Function,
onStartShouldSetResponder?: ?Function,
pressRetentionOffset?: ?PressRetentionOffset,
selectable?: ?boolean,
style?: ?DangerouslyImpreciseStyleProp,
testID?: string,
// Android Only
disabled?: boolean,
selectionColor?: string,
disabled?: ?boolean,
selectionColor?: ?string,
textBreakStrategy?: 'balanced' | 'highQuality' | 'simple',
// iOS Only
adjustsFontSizeToFit?: boolean,
minimumFontScale?: number,
suppressHighlighting?: boolean,
adjustsFontSizeToFit?: ?boolean,
minimumFontScale?: ?number,
suppressHighlighting?: ?boolean,

0 comments on commit 3fd82d3

Please sign in to comment.