-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathDeprecatedTextPropTypes.js
106 lines (102 loc) · 3.19 KB
/
DeprecatedTextPropTypes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const DeprecatedColorPropType = require('./DeprecatedColorPropType');
const DeprecatedEdgeInsetsPropType = require('./DeprecatedEdgeInsetsPropType');
const DeprecatedStyleSheetPropType = require('./DeprecatedStyleSheetPropType');
const DeprecatedTextStylePropTypes = require('./DeprecatedTextStylePropTypes');
const {
AccessibilityActionInfoPropType,
AccessibilityRolePropType,
AccessibilityStatePropType,
AccessibilityValuePropType,
RolePropType,
} = require('./DeprecatedViewAccessibility');
const PropTypes = require('prop-types');
/**
* @see facebook/react-native/Libraries/Text/TextProps.js
*/
const DeprecatedTextPropTypes = {
'aria-busy': PropTypes.bool,
'aria-checked': PropTypes.oneOfType([
PropTypes.bool,
PropTypes.oneOf(['mixed']),
]),
'aria-disabled': PropTypes.bool,
'aria-expanded': PropTypes.bool,
'aria-label': PropTypes.string,
'aria-labelledby': PropTypes.string,
'aria-selected': PropTypes.bool,
accessibilityActions: PropTypes.arrayOf(AccessibilityActionInfoPropType),
accessibilityHint: PropTypes.string,
accessibilityLabel: PropTypes.string,
accessibilityLanguage: PropTypes.string,
accessibilityRole: AccessibilityRolePropType,
accessibilityState: AccessibilityStatePropType,
accessible: PropTypes.bool,
adjustsFontSizeToFit: PropTypes.bool,
allowFontScaling: PropTypes.bool,
android_hyphenationFrequency: PropTypes.oneOf(['normal', 'none', 'full']),
dataDetectorType: PropTypes.oneOf([
'all',
'email',
'link',
'none',
'phoneNumber',
]),
disabled: PropTypes.bool,
dynamicTypeRamp: PropTypes.oneOf([
'body',
'callout',
'caption1',
'caption2',
'footnote',
'headline',
'largeTitle',
'subheadline',
'title1',
'title2',
'title3',
]),
ellipsizeMode: PropTypes.oneOf(['clip', 'head', 'middle', 'tail']),
id: PropTypes.string,
lineBreakStrategyIOS: PropTypes.oneOf([
'hangul-word',
'none',
'push-out',
'standard',
]),
maxFontSizeMultiplier: PropTypes.number,
minimumFontScale: PropTypes.number,
nativeID: PropTypes.string,
numberOfLines: PropTypes.number,
onAccessibilityAction: PropTypes.func,
onLayout: PropTypes.func,
onLongPress: PropTypes.func,
onMoveShouldSetResponder: PropTypes.func,
onPress: PropTypes.func,
onPressIn: PropTypes.func,
onPressOut: PropTypes.func,
onResponderGrant: PropTypes.func,
onResponderMove: PropTypes.func,
onResponderRelease: PropTypes.func,
onResponderTerminate: PropTypes.func,
onResponderTerminationRequest: PropTypes.func,
onStartShouldSetResponder: PropTypes.func,
onTextLayout: PropTypes.func,
pressRetentionOffset: DeprecatedEdgeInsetsPropType,
role: RolePropType,
selectable: PropTypes.bool,
selectionColor: DeprecatedColorPropType,
style: DeprecatedStyleSheetPropType(DeprecatedTextStylePropTypes),
suppressHighlighting: PropTypes.bool,
testID: PropTypes.string,
textBreakStrategy: PropTypes.oneOf(['balanced', 'highQuality', 'simple']),
};
module.exports = DeprecatedTextPropTypes;