react-native-ui-lib 7.40.1 → 7.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/scripts/docs/buildDocsCommon.js +2 -1
  3. package/scripts/release/prReleaseNotesCommon.js +2 -1
  4. package/src/components/WheelPicker/Item.d.ts +1 -0
  5. package/src/components/WheelPicker/Item.js +6 -1
  6. package/src/components/WheelPicker/wheelPicker.api.json +85 -13
  7. package/src/components/chip/chip.api.json +7 -1
  8. package/src/components/chipsInput/chipsInput.api.json +55 -9
  9. package/src/components/colorPalette/ColorPalette.api.json +12 -5
  10. package/src/components/colorPicker/colorPicker.api.json +19 -11
  11. package/src/components/drawer/drawer.api.json +112 -19
  12. package/src/components/drawer/index.d.ts +2 -0
  13. package/src/components/drawer/index.js +2 -2
  14. package/src/components/image/image.api.json +82 -14
  15. package/src/components/numberInput/numberInput.api.json +50 -6
  16. package/src/components/pageControl/pageControl.api.json +43 -5
  17. package/src/components/picker/PickerItemsList.js +4 -1
  18. package/src/components/picker/index.js +9 -3
  19. package/src/components/pieChart/pieChart.api.json +43 -5
  20. package/src/components/radioButton/radioButton.api.json +8 -4
  21. package/src/components/radioGroup/radioGroup.api.json +7 -6
  22. package/src/components/segmentedControl/segmentedControl.api.json +10 -12
  23. package/src/components/slider/slider.api.json +2 -2
  24. package/src/components/sortableGridList/sortableGridList.api.json +31 -3
  25. package/src/components/stepper/stepper.api.json +3 -1
  26. package/src/components/switch/switch.api.json +21 -16
  27. package/src/components/test.api.json +1 -1
  28. package/src/components/timeline/Point.js +5 -2
  29. package/src/components/timeline/index.js +3 -1
  30. package/src/components/timeline/types.d.ts +1 -0
  31. package/src/incubator/calendar/Agenda.js +25 -13
  32. package/src/incubator/calendar/Header.js +12 -2
  33. package/src/incubator/calendar/index.js +15 -16
  34. package/src/incubator/calendar/types.d.ts +0 -1
  35. package/src/incubator/index.d.ts +1 -1
  36. package/src/incubator/index.js +1 -1
  37. package/src/incubator/slider/slider.api.json +6 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.40.1",
3
+ "version": "7.41.0",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -26,7 +26,8 @@ const VALID_COMPONENTS_CATEGORIES = [
26
26
  'incubator',
27
27
  'infra',
28
28
  // non components categories
29
- 'services'
29
+ 'services',
30
+ 'dev' // development category for components we don't want to render in our docs (used in test.api.json)
30
31
  ];
31
32
 
32
33
  function buildDocs(apiFolders, componentsPreProcess) {
@@ -196,7 +196,7 @@ async function generateReleaseNotes(latestVersion,
196
196
  newVersion,
197
197
  fileNamePrefix,
198
198
  repo,
199
- header = '',
199
+ getHeader = () => '',
200
200
  tagPrefix = '',
201
201
  categories = []) {
202
202
  let latestVer, newVer;
@@ -214,6 +214,7 @@ async function generateReleaseNotes(latestVersion,
214
214
  });
215
215
 
216
216
  rl.on('close', () => {
217
+ const header = getHeader(newVer);
217
218
  console.info(`Current latest version is v${latestVer}`);
218
219
  console.info(`Generating release notes out or PRs for v${newVer}`);
219
220
  _generateReleaseNotes(latestVer, newVer, fileNamePrefix, repo, header, tagPrefix, categories);
@@ -17,6 +17,7 @@ interface InternalProps<T> extends WheelPickerItemProps<T> {
17
17
  inactiveColor?: string;
18
18
  style?: TextStyle;
19
19
  onSelect: (index: number) => void;
20
+ onPress?: () => void;
20
21
  centerH?: boolean;
21
22
  fakeLabel?: string;
22
23
  fakeLabelStyle?: TextStyle;
@@ -18,6 +18,7 @@ const WheelPickerItem = props => {
18
18
  fakeLabelProps,
19
19
  itemHeight,
20
20
  onSelect,
21
+ onPress,
21
22
  offset,
22
23
  activeColor = Colors.$textPrimary,
23
24
  inactiveColor = Colors.$textNeutralHeavy,
@@ -52,8 +53,12 @@ const WheelPickerItem = props => {
52
53
  const textStyle = useMemo(() => {
53
54
  return [animatedColorStyle, style, fakeLabel ? textWithLabelPaddingStyle : styles.textPadding];
54
55
  }, [style, fakeLabel, animatedColorStyle, textWithLabelPaddingStyle]);
56
+ const _onPress = useCallback(() => {
57
+ selectItem();
58
+ onPress?.();
59
+ }, [onPress, selectItem]);
55
60
  const _fakeLabelStyle = useMemo(() => StyleSheet.flatten([fakeLabelStyle, styles.hidden]), [fakeLabelStyle]);
56
- return <AnimatedTouchableOpacity activeOpacity={1} style={containerStyle} key={index} centerV centerH={align ? align === WheelPickerAlign.CENTER : centerH} right={align ? align === WheelPickerAlign.RIGHT : !centerH} left={align === WheelPickerAlign.LEFT} onPress={selectItem}
61
+ return <AnimatedTouchableOpacity activeOpacity={1} style={containerStyle} key={index} centerV centerH={align ? align === WheelPickerAlign.CENTER : centerH} right={align ? align === WheelPickerAlign.RIGHT : !centerH} left={align === WheelPickerAlign.LEFT} onPress={_onPress}
57
62
  // @ts-ignore reanimated2
58
63
  index={index} testID={testID} row>
59
64
  <AnimatedText text60R testID={`${testID}.text`} numberOfLines={1} style={textStyle} recorderTag={'unmask'}>
@@ -6,16 +6,58 @@
6
6
  "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/WheelPickerScreen.tsx",
7
7
  "images": [],
8
8
  "props": [
9
- {"name": "initialValue", "type": "number | string", "description": "Initial value (uncontrolled)"},
10
- {"name": "items", "type": "WheelPickerItemProps[]", "description": "Data source for WheelPicker"},
11
- {"name": "itemHeight", "type": "number", "description": "Height of each item in the WheelPicker", "default": "44"},
12
- {"name": "numberOfVisibleRows", "type": "number", "description": "Number of rows visible", "default": "5"},
13
- {"name": "activeTextColor", "type": "string", "description": "Text color for the focused row"},
14
- {"name": "inactiveTextColor", "type": "string", "description": "Text color for other, non-focused rows"},
15
- {"name": "textStyle", "type": "TextStyle", "description": "Row text custom style"},
16
- {"name": "label", "type": "string", "description": "Additional label to render next to the items text"},
17
- {"name": "labelStyle", "type": "TextStyle", "description": "Additional label's style"},
18
- {"name": "labelProps", "type": "TextProps", "description": "Additional label's props"},
9
+ {
10
+ "name": "initialValue",
11
+ "type": "number | string",
12
+ "description": "Initial value (uncontrolled)"
13
+ },
14
+ {
15
+ "name": "items",
16
+ "type": "WheelPickerItemProps[]",
17
+ "description": "Data source for WheelPicker"
18
+ },
19
+ {
20
+ "name": "itemHeight",
21
+ "type": "number",
22
+ "description": "Height of each item in the WheelPicker",
23
+ "default": "44"
24
+ },
25
+ {
26
+ "name": "numberOfVisibleRows",
27
+ "type": "number",
28
+ "description": "Number of rows visible",
29
+ "default": "5"
30
+ },
31
+ {
32
+ "name": "activeTextColor",
33
+ "type": "string",
34
+ "description": "Text color for the focused row"
35
+ },
36
+ {
37
+ "name": "inactiveTextColor",
38
+ "type": "string",
39
+ "description": "Text color for other, non-focused rows"
40
+ },
41
+ {
42
+ "name": "textStyle",
43
+ "type": "TextStyle",
44
+ "description": "Row text custom style"
45
+ },
46
+ {
47
+ "name": "label",
48
+ "type": "string",
49
+ "description": "Additional label to render next to the items text"
50
+ },
51
+ {
52
+ "name": "labelStyle",
53
+ "type": "TextStyle",
54
+ "description": "Additional label's style"
55
+ },
56
+ {
57
+ "name": "labelProps",
58
+ "type": "TextProps",
59
+ "description": "Additional label's props"
60
+ },
19
61
  {
20
62
  "name": "onChange",
21
63
  "type": "(item: string | number, index: number) => void",
@@ -33,8 +75,16 @@
33
75
  "description": "Align the content to center, right ot left",
34
76
  "default": "center"
35
77
  },
36
- {"name": "separatorsStyle", "type": "ViewStyle", "description": "Extra style for the separators"},
37
- {"name": "testID", "type": "string", "description": "test identifier"},
78
+ {
79
+ "name": "separatorsStyle",
80
+ "type": "ViewStyle",
81
+ "description": "Extra style for the separators"
82
+ },
83
+ {
84
+ "name": "testID",
85
+ "type": "string",
86
+ "description": "test identifier"
87
+ },
38
88
  {
39
89
  "name": "flatListProps",
40
90
  "type": "FlatListProps",
@@ -47,5 +97,27 @@
47
97
  " initialValue={'yes'$2}",
48
98
  " onChange={() => console.log('changed')$3}",
49
99
  "/>"
50
- ]
100
+ ],
101
+ "docs": {
102
+ "hero": {
103
+ "title": "WheelPicker",
104
+ "description": "A customizable WheelPicker component"
105
+ },
106
+ "tabs": [
107
+ {
108
+ "title": "UX Guidelines",
109
+ "sections": [
110
+ {
111
+ "type": "section",
112
+ "content": [
113
+ {
114
+ "value": "https://embed.figma.com/design/Krv1pLl7kq2L52vMRwd498/MADS-Guidelines?node-id=13-134250&embed-host=share",
115
+ "height": 1600
116
+ }
117
+ ]
118
+ }
119
+ ]
120
+ }
121
+ ]
122
+ }
51
123
  }
@@ -53,6 +53,12 @@
53
53
  {"name": "testID", "type": "string", "description": "The test id for e2e tests"}
54
54
  ],
55
55
  "snippet": [
56
- "<Chip label={'Chip'$1} onPress={() => console.log('pressed')$2}/>"
56
+ "<View flex center gap-s4>",
57
+ "<Chip label={'Chip'} onPress={() => console.log('pressed')}/>",
58
+ "<Chip label={'Square'} borderRadius={2} backgroundColor={Colors.blue50}/>",
59
+ "<Chip label={'Badge'} badgeProps={{label: '2', backgroundColor: Colors.red30}}/>",
60
+ "<Chip label={'Avatar'} avatarProps={{source: {uri: 'https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/icons/icon%20examples%20for%20docs/avatar_1.jpg'}}}/>",
61
+ "<Chip label={'Accessories'} rightElement={<Icon source={Assets.icons.demo.chevronRight}/>}/>",
62
+ "</View>"
57
63
  ]
58
64
  }
@@ -2,12 +2,22 @@
2
2
  "name": "ChipsInput",
3
3
  "category": "form",
4
4
  "description": "A chips input",
5
- "extends": ["form/TextField"],
6
- "modifiers": ["margin", "color", "typography"],
5
+ "extends": [
6
+ "form/TextField"
7
+ ],
8
+ "modifiers": [
9
+ "margin",
10
+ "color",
11
+ "typography"
12
+ ],
7
13
  "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ChipsInputScreen.tsx",
8
14
  "images": [],
9
15
  "props": [
10
- {"name": "chips", "type": "ChipProps[]", "description": "List of chips to render"},
16
+ {
17
+ "name": "chips",
18
+ "type": "ChipProps[]",
19
+ "description": "List of chips to render"
20
+ },
11
21
  {
12
22
  "name": "defaultChipProps",
13
23
  "type": "ChipProps",
@@ -18,12 +28,48 @@
18
28
  "type": "(newChips, changeReason, updatedChip) => void",
19
29
  "description": "Callback for chips change (adding or removing chip)"
20
30
  },
21
- {"name": "maxChips", "type": "number", "description": "The maximum chips to allow adding"}
31
+ {
32
+ "name": "maxChips",
33
+ "type": "number",
34
+ "description": "The maximum chips to allow adding"
35
+ }
22
36
  ],
23
37
  "snippet": [
24
- "<ChipsInput",
25
- " placeholder={'Placeholder'$1}",
26
- " chips={[{label: 'Falcon 9'}, {label: 'Enterprise'}, {label: 'Challenger', borderRadius: 0}]$2}",
27
- "/>"
28
- ]
38
+ "function Example(props) {",
39
+ " const [chips, setChips] = useState([{label: 'Falcon 9'}, {label: 'Enterprise'}]);",
40
+
41
+ " return (",
42
+ " <View flex padding-s5>",
43
+ " <ChipsInput",
44
+ " onChange={setChips}",
45
+ " placeholder={'Placeholder'}",
46
+ " defaultChipProps={{borderRadius: 0}}",
47
+ " chips={chips}",
48
+ " />",
49
+ " </View>",
50
+ " );",
51
+ "}"
52
+ ],
53
+ "docs": {
54
+ "hero": {
55
+ "title": "ChipsInput",
56
+ "description": "A chips input"
57
+ },
58
+ "tabs": [
59
+ {
60
+ "title": "UX Guidelines",
61
+ "sections": [
62
+ {
63
+ "type": "section",
64
+ "content": [
65
+ {
66
+ "value": "https://embed.figma.com/design/Krv1pLl7kq2L52vMRwd498/MADS-Guidelines?node-id=13-114418&embed-host=share",
67
+ "height": 1600
68
+ }
69
+ ]
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ }
29
75
  }
@@ -79,11 +79,18 @@
79
79
  }
80
80
  ],
81
81
  "snippet": [
82
- "<ColorPalette",
83
- " colors={['transparent', Colors.green30, Colors.yellow30, Colors.red30]$1}",
84
- " value={selectedColor$2}",
85
- " onValueChange={() => console.log('value changed')$3}",
86
- "/>"
82
+ "function Example(props) {",
83
+ " const [value, setValue] = useState(Colors.yellow30);",
84
+ " return (",
85
+ " <View flex padding-s5 gap-s4>",
86
+ " <ColorPalette",
87
+ " colors={['transparent', Colors.green30, Colors.yellow30, Colors.red30]}",
88
+ " value={value}",
89
+ " onValueChange={setValue}",
90
+ " />",
91
+ " </View>",
92
+ " );",
93
+ "}"
87
94
  ],
88
95
  "docs": {
89
96
  "hero": {
@@ -47,14 +47,22 @@
47
47
  }
48
48
  ],
49
49
  "snippet": [
50
- "<ColorPicker",
51
- " colors={[Colors.green10, Colors.green20, Colors.green30, Colors.green40, Colors.green50, Colors.green60, Colors.green70]$1}",
52
- " initialColor={Colors.green10$2}",
53
- " value={currentColor$3}",
54
- " onDismiss={() => console.log('dismissed')$4}",
55
- " onSubmit={() => console.log('submit')$5}",
56
- " onValueChange={() => console.log('value changed')$6}",
57
- "/>"
50
+ "function Example(props) {",
51
+ " const [colors, setColors] = useState([Colors.green30, Colors.yellow30, Colors.red30]);",
52
+ " const [color, setColor] = useState();",
53
+ " return (",
54
+ " <View flex padding-s5>",
55
+ " <ColorPicker",
56
+ " colors={colors}",
57
+ " initialColor={Colors.green10}",
58
+ " value={color}",
59
+ " onDismiss={() => console.log('dismissed')}",
60
+ " onSubmit={(newColor) => setColors([newColor, ...colors])}",
61
+ " onValueChange={setColor}",
62
+ " />",
63
+ " </View>",
64
+ " );",
65
+ "}"
58
66
  ],
59
67
  "docs": {
60
68
  "hero": {
@@ -77,7 +85,7 @@
77
85
  "items": [
78
86
  {
79
87
  "title": "",
80
- "description": "markdown:1. Tapping 'Add New' in the Color Palette opens a color picker dialog.\n2. Using HLS controls (or even typing actual HEX value) user can achieve any color. ",
88
+ "description": "markdown: 1. Tapping 'Add New' in the Color Palette opens a color picker dialog. \n2. Using HLS controls (or even typing actual HEX value) user can achieve any color. ",
81
89
  "content": [
82
90
  {
83
91
  "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/ColorPicker/ColorPicker_usage1.png"
@@ -113,7 +121,7 @@
113
121
  "items": [
114
122
  {
115
123
  "title": "",
116
- "description": "markdown:1. Tapping on the HEX value will “activate” the input field (Main Input) and display the keyboard. New color can be created either by typing a hex value or by pasting a specific value. \n2. Until new valid hex value is provided, the initial color background is kept. Hex value is highlighted with either white at 25% or black at 25%, depending on the background color. ",
124
+ "description": "markdown: 1. Tapping on the HEX value will “activate” the input field (Main Input) and display the keyboard. New color can be created either by typing a hex value or by pasting a specific value. \n2. Until new valid hex value is provided, the initial color background is kept. Hex value is highlighted with either white at 25% or black at 25%, depending on the background color. ",
117
125
  "content": [
118
126
  {
119
127
  "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/ColorPicker/ColorPicker_hex1.png"
@@ -122,7 +130,7 @@
122
130
  },
123
131
  {
124
132
  "title": "",
125
- "description": "markdown:3. ‘#’ symbol is permanent and cant be deleted. \n4. Once hex value is valid (6 characters), background color changes accordingly. ",
133
+ "description": "markdown: 3. ‘#’ symbol is permanent and cant be deleted. \n4. Once hex value is valid (6 characters), background color changes accordingly. ",
126
134
  "content": [
127
135
  {
128
136
  "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/ColorPicker/ColorPicker_hex2.png"
@@ -3,7 +3,9 @@
3
3
  "category": "lists",
4
4
  "description": "Drawer Component",
5
5
  "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/DrawerScreen.tsx",
6
- "images": ["https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Drawer/Drawer.gif?raw=true"],
6
+ "images": [
7
+ "https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Drawer/Drawer.gif?raw=true"
8
+ ],
7
9
  "props": [
8
10
  {
9
11
  "name": "rightItems",
@@ -15,20 +17,53 @@
15
17
  "type": "ItemProps",
16
18
  "description": "The bottom layer's item to appear when opened from the left (a single item)"
17
19
  },
18
- {"name": "bounciness", "type": "number", "description": "The drawer animation bounciness"},
19
- {"name": "itemsMinWidth", "type": "number", "description": "Set a different minimum width"},
20
+ {
21
+ "name": "bounciness",
22
+ "type": "number",
23
+ "description": "The drawer animation bounciness"
24
+ },
25
+ {
26
+ "name": "itemsMinWidth",
27
+ "type": "number",
28
+ "description": "Set a different minimum width"
29
+ },
20
30
  {
21
31
  "name": "itemsTintColor",
22
32
  "type": "string",
23
33
  "description": "The color for the text and icon tint of the items",
24
34
  "default": "Colors.white"
25
35
  },
26
- {"name": "itemsIconSize", "type": "number", "description": "The items' icon size", "default": "24"},
27
- {"name": "itemsTextStyle", "type": "TextStyle", "description": "The items' text style"},
28
- {"name": "useNativeAnimations", "type": "boolean", "description": "Perform the animation in natively"},
29
- {"name": "fullSwipeLeft", "type": "boolean", "description": "Whether to allow a full left swipe"},
30
- {"name": "fullLeftThreshold", "type": "number", "description": "Threshold for a left full swipe (0-1)"},
31
- {"name": "onFullSwipeLeft", "type": "() => void", "description": "Callback for left item full swipe"},
36
+ {
37
+ "name": "itemsIconSize",
38
+ "type": "number",
39
+ "description": "The items' icon size",
40
+ "default": "24"
41
+ },
42
+ {
43
+ "name": "itemsTextStyle",
44
+ "type": "TextStyle",
45
+ "description": "The items' text style"
46
+ },
47
+ {
48
+ "name": "useNativeAnimations",
49
+ "type": "boolean",
50
+ "description": "Perform the animation in natively"
51
+ },
52
+ {
53
+ "name": "fullSwipeLeft",
54
+ "type": "boolean",
55
+ "description": "Whether to allow a full left swipe"
56
+ },
57
+ {
58
+ "name": "fullLeftThreshold",
59
+ "type": "number",
60
+ "description": "Threshold for a left full swipe (0-1)"
61
+ },
62
+ {
63
+ "name": "onFullSwipeLeft",
64
+ "type": "() => void",
65
+ "description": "Callback for left item full swipe"
66
+ },
32
67
  {
33
68
  "name": "onWillFullSwipeLeft",
34
69
  "type": "() => void",
@@ -39,24 +74,82 @@
39
74
  "type": "() => {rowWidth, leftWidth, dragX, resetItemPosition}",
40
75
  "description": "Callback for left item toggle swipe"
41
76
  },
42
- {"name": "fullSwipeRight", "type": "boolean", "description": "Whether to allow a full right swipe"},
43
- {"name": "fullRightThreshold", "type": "number", "description": "Threshold for a right full swipe (0-1)"},
44
- {"name": "onFullSwipeRight", "type": "() => void", "description": "Callback for right item full swipe"},
77
+ {
78
+ "name": "fullSwipeRight",
79
+ "type": "boolean",
80
+ "description": "Whether to allow a full right swipe"
81
+ },
82
+ {
83
+ "name": "fullRightThreshold",
84
+ "type": "number",
85
+ "description": "Threshold for a right full swipe (0-1)"
86
+ },
87
+ {
88
+ "name": "onFullSwipeRight",
89
+ "type": "() => void",
90
+ "description": "Callback for right item full swipe"
91
+ },
45
92
  {
46
93
  "name": "onWillFullSwipeRight",
47
94
  "type": "() => void",
48
95
  "description": "Callback for just before right item full swipe"
49
96
  },
50
- {"name": "disableHaptic", "type": "boolean", "description": "Whether to disable the haptic"},
51
- {"name": "onDragStart", "type": "() => any", "description": "Called when drag gesture starts"},
52
- {"name": "onSwipeableWillOpen", "type": "() => void", "description": "Callback for open action"},
53
- {"name": "onSwipeableWillClose", "type": "() => void", "description": "Callback for close action"},
97
+ {
98
+ "name": "disableHaptic",
99
+ "type": "boolean",
100
+ "description": "Whether to disable the haptic"
101
+ },
102
+ {
103
+ "name": "onDragStart",
104
+ "type": "() => any",
105
+ "description": "Called when drag gesture starts"
106
+ },
107
+ {
108
+ "name": "onSwipeableWillOpen",
109
+ "type": "() => void",
110
+ "description": "Callback for open action"
111
+ },
112
+ {
113
+ "name": "onSwipeableWillClose",
114
+ "type": "() => void",
115
+ "description": "Callback for close action"
116
+ },
54
117
  {
55
118
  "name": "customValue",
56
119
  "type": "any",
57
120
  "description": "Custom value of any type to pass on to the component and receive back in the action callbacks"
58
121
  },
59
- {"name": "style", "type": "ViewStyle", "description": "Component's style"},
60
- {"name": "testID", "type": "string", "description": "The test id for e2e tests"}
61
- ]
122
+ {
123
+ "name": "style",
124
+ "type": "ViewStyle",
125
+ "description": "Component's style"
126
+ },
127
+ {
128
+ "name": "testID",
129
+ "type": "string",
130
+ "description": "The test id for e2e tests"
131
+ }
132
+ ],
133
+ "docs": {
134
+ "hero": {
135
+ "title": "Drawer",
136
+ "description": "Drawer Component"
137
+ },
138
+ "tabs": [
139
+ {
140
+ "title": "UX Guidelines",
141
+ "sections": [
142
+ {
143
+ "type": "section",
144
+ "content": [
145
+ {
146
+ "value": "https://embed.figma.com/design/Krv1pLl7kq2L52vMRwd498/MADS-Guidelines?node-id=5958-379805&embed-host=share",
147
+ "height": 1600
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ }
153
+ ]
154
+ }
62
155
  }
@@ -5,7 +5,9 @@ interface DrawerItemProps {
5
5
  width?: number;
6
6
  background?: string;
7
7
  text?: string;
8
+ textColor?: string;
8
9
  icon?: number;
10
+ iconColor?: string;
9
11
  onPress?: Function;
10
12
  keepOpen?: boolean;
11
13
  style?: ViewStyle;
@@ -229,14 +229,14 @@ class Drawer extends PureComponent {
229
229
  {!item.customElement && item.icon && <Animated.Image source={item.icon} style={[styles.actionIcon, {
230
230
  width: itemsIconSize,
231
231
  height: itemsIconSize,
232
- tintColor: itemsTintColor,
232
+ tintColor: item.iconColor || itemsTintColor,
233
233
  opacity,
234
234
  transform: [{
235
235
  scale
236
236
  }]
237
237
  }]} />}
238
238
  {!item.customElement && item.text && <Animated.Text style={[styles.actionText, {
239
- color: itemsTintColor,
239
+ color: item.textColor || itemsTintColor,
240
240
  opacity,
241
241
  transform: [{
242
242
  scale