-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathoptionPropTypes.js
73 lines (51 loc) · 2.04 KB
/
optionPropTypes.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
import PropTypes from 'prop-types';
import CONST from '../CONST';
import participantPropTypes from './participantPropTypes';
import avatarPropTypes from './avatarPropTypes';
export default PropTypes.shape({
// Text to display
text: PropTypes.string,
/** Display the text of the option in bold font style */
boldStyle: PropTypes.bool,
// Alternate text to display
alternateText: PropTypes.string,
// Alternate text number of lines
alternateTextMaxLines: PropTypes.number,
// Array of icon information
icons: PropTypes.arrayOf(avatarPropTypes),
// Login (only present when there is a single participant)
login: PropTypes.string,
// reportID (only present when there is a matching report)
reportID: PropTypes.string,
// Whether the report has a draft comment or not
hasDraftComment: PropTypes.bool,
// Key used internally by React
keyForList: PropTypes.string,
// Search text we use to filter options
searchText: PropTypes.string,
// Whether the report is pinned or not
isPinned: PropTypes.bool,
// Whether the report corresponds to a chat room
isChatRoom: PropTypes.bool,
// Whether the option has an outstanding IOU
hasOutstandingIOU: PropTypes.bool,
// Custom icon to render on the right side of the option
customIcon: PropTypes.shape({
// The icon source
src: PropTypes.func,
// The color of the icon
color: PropTypes.string,
}),
// List of participants of the report
participantsList: PropTypes.arrayOf(participantPropTypes),
// Descriptive text to be displayed besides selection element
descriptiveText: PropTypes.string,
// The type of option we have e.g. user or report
type: PropTypes.string,
// Text to show for tooltip
tooltipText: PropTypes.string,
/** If we need to show a brick road indicator or not */
brickRoadIndicator: PropTypes.oneOf([CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR, '']),
phoneNumber: PropTypes.string,
payPalMeAddress: PropTypes.string,
});