@momo-kits/foundation 0.89.3 → 0.89.4-rc.2

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.
@@ -7,6 +7,11 @@ import {InputDropDownProps} from './index';
7
7
  import {Icon} from '../Icon';
8
8
  import {Loader} from '../Loader';
9
9
  import {Styles} from '../Consts';
10
+ import {formatComponentName} from '../Application/utils';
11
+
12
+ const {
13
+ ScreenContext,
14
+ } = require('react-native/Libraries/Components/ScreenContext');
10
15
 
11
16
  const InputDropDown = ({
12
17
  value,
@@ -26,11 +31,13 @@ const InputDropDown = ({
26
31
  leadingIcon,
27
32
  leadingIconColor,
28
33
  style,
34
+ params,
35
+ componentId,
29
36
  ...props
30
37
  }: InputDropDownProps) => {
31
38
  const {theme} = useContext(ApplicationContext);
32
39
  const full = !!value || !!placeholder;
33
- const accessibilityLabel = `InputDropDown/${floatingValue ?? placeholder}`;
40
+ const screenInfo = useContext<any>(ScreenContext);
34
41
 
35
42
  const renderIcon = (color: string | undefined) => {
36
43
  if (loading) {
@@ -82,7 +89,6 @@ const InputDropDown = ({
82
89
  <TextInput
83
90
  {...props}
84
91
  onPressIn={onPress}
85
- accessibilityLabel={accessibilityLabel}
86
92
  editable={false}
87
93
  textAlignVertical="top"
88
94
  style={[
@@ -105,14 +111,27 @@ const InputDropDown = ({
105
111
  );
106
112
  };
107
113
 
114
+ const button_name = formatComponentName(floatingValue || '');
115
+
108
116
  return (
109
- <TouchableOpacity
110
- onPress={onPress}
111
- style={[style, full && styles.wrapper]}
112
- accessibilityLabel={accessibilityLabel}>
113
- {renderInputView()}
114
- <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
115
- </TouchableOpacity>
117
+ <ScreenContext.Provider
118
+ value={{
119
+ ...screenInfo,
120
+ componentName: 'InputOTP',
121
+ params: {
122
+ ...params,
123
+ button_name,
124
+ },
125
+ state: 'enabled',
126
+ componentId,
127
+ }}>
128
+ <TouchableOpacity
129
+ onPress={onPress}
130
+ style={[style, full && styles.wrapper]}>
131
+ {renderInputView()}
132
+ <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
133
+ </TouchableOpacity>
134
+ </ScreenContext.Provider>
116
135
  );
117
136
  };
118
137
 
@@ -18,6 +18,11 @@ import {ErrorView, FloatingView, getBorderColor, getSizeStyle} from './common';
18
18
  import {InputMoneyProps} from './index';
19
19
  import {Icon} from '../Icon';
20
20
  import {formatMoneyToNumber, formatNumberToMoney} from './utils';
21
+ import {formatComponentName} from '../Application/utils';
22
+
23
+ const {
24
+ ScreenContext,
25
+ } = require('react-native/Libraries/Components/ScreenContext');
21
26
 
22
27
  const InputMoney = forwardRef(
23
28
  (
@@ -36,7 +41,9 @@ const InputMoney = forwardRef(
36
41
  required = false,
37
42
  errorSpacing,
38
43
  style,
44
+ params,
39
45
  defaultValue = '',
46
+ componentId,
40
47
  ...props
41
48
  }: InputMoneyProps,
42
49
  ref,
@@ -44,7 +51,7 @@ const InputMoney = forwardRef(
44
51
  const {theme} = useContext(ApplicationContext);
45
52
  const [focused, setFocused] = useState(false);
46
53
  const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
47
- const accessibilityLabel = `InputMoney/${floatingValue}`;
54
+ const screenInfo = useContext<any>(ScreenContext);
48
55
 
49
56
  const validateText = (text: string) => {
50
57
  const valueFormat = formatMoneyToNumber(text, 'đ');
@@ -115,7 +122,6 @@ const InputMoney = forwardRef(
115
122
  <View style={styles.inputView}>
116
123
  <TextInput
117
124
  {...props}
118
- accessibilityLabel={accessibilityLabel}
119
125
  editable={!disabled}
120
126
  textAlignVertical="top"
121
127
  ref={inputRef}
@@ -153,13 +159,37 @@ const InputMoney = forwardRef(
153
159
  );
154
160
  };
155
161
 
162
+ let inputState = 'active';
163
+
164
+ if (value && value?.length > 0) {
165
+ inputState = 'filled';
166
+ }
167
+ if (errorMessage && errorMessage?.length > 0) {
168
+ inputState = 'error';
169
+ }
170
+
171
+ if (disabled) {
172
+ inputState = 'disabled';
173
+ }
174
+ const component_name = formatComponentName(floatingValue || '');
175
+
156
176
  return (
157
- <View
158
- style={[style, styles.wrapper]}
159
- accessibilityLabel={accessibilityLabel}>
160
- {renderInputView()}
161
- <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
162
- </View>
177
+ <ScreenContext.Provider
178
+ value={{
179
+ ...screenInfo,
180
+ componentName: 'InputMoney',
181
+ params: {
182
+ ...params,
183
+ component_name,
184
+ },
185
+ state: inputState,
186
+ componentId,
187
+ }}>
188
+ <View style={[style, styles.wrapper]}>
189
+ {renderInputView()}
190
+ <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
191
+ </View>
192
+ </ScreenContext.Provider>
163
193
  );
164
194
  },
165
195
  );
@@ -21,6 +21,11 @@ import styles from './styles';
21
21
  import {ErrorView, getBorderColor} from './common';
22
22
  import {ApplicationContext} from '../Application';
23
23
  import {Spacing} from '../Consts';
24
+ import {formatComponentName} from '../Application/utils';
25
+
26
+ const {
27
+ ScreenContext,
28
+ } = require('react-native/Libraries/Components/ScreenContext');
24
29
 
25
30
  const OTPCaret: FC<CaretProps> = ({index, length}) => {
26
31
  const DURATION = 300;
@@ -78,7 +83,9 @@ const InputOTP = forwardRef(
78
83
  onFocus,
79
84
  onBlur,
80
85
  dataType = 'number',
86
+ params,
81
87
  style,
88
+ componentId,
82
89
  ...props
83
90
  }: InputOTPProps,
84
91
  ref,
@@ -88,7 +95,7 @@ const InputOTP = forwardRef(
88
95
  const [focused, setFocused] = useState(false);
89
96
  const inputRef = useRef<TextInput>(null);
90
97
  const {theme} = useContext(ApplicationContext);
91
- const accessibilityLabel = `InputOTP/${floatingValue ?? placeholder}`;
98
+ const screenInfo = useContext<any>(ScreenContext);
92
99
 
93
100
  useImperativeHandle(ref, () => ({
94
101
  onChangeText: (text: string) => {
@@ -206,7 +213,6 @@ const InputOTP = forwardRef(
206
213
  <View style={styles.inputView}>
207
214
  <TextInput
208
215
  {...props}
209
- accessibilityLabel={accessibilityLabel}
210
216
  ref={inputRef}
211
217
  value={value}
212
218
  onChangeText={_onChangeText}
@@ -221,16 +227,28 @@ const InputOTP = forwardRef(
221
227
  </View>
222
228
  );
223
229
  };
230
+ const component_name = formatComponentName(floatingValue || '');
224
231
 
225
232
  return (
226
- <TouchableOpacity
227
- activeOpacity={1}
228
- onPress={onFocusInput}
229
- style={[style, styles.otpWrapper]}
230
- accessibilityLabel={accessibilityLabel}>
231
- {renderInputView()}
232
- <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
233
- </TouchableOpacity>
233
+ <ScreenContext.Provider
234
+ value={{
235
+ ...screenInfo,
236
+ componentName: 'InputOTP',
237
+ params: {
238
+ ...params,
239
+ component_name,
240
+ },
241
+ state: 'enabled',
242
+ componentId,
243
+ }}>
244
+ <TouchableOpacity
245
+ activeOpacity={1}
246
+ onPress={onFocusInput}
247
+ style={[style, styles.otpWrapper]}>
248
+ {renderInputView()}
249
+ <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
250
+ </TouchableOpacity>
251
+ </ScreenContext.Provider>
234
252
  );
235
253
  },
236
254
  );
@@ -13,6 +13,10 @@ import {Icon} from '../Icon';
13
13
  import {Text} from '../Text';
14
14
  import {checkTyping} from './utils';
15
15
 
16
+ const {
17
+ ScreenContext,
18
+ } = require('react-native/Libraries/Components/ScreenContext');
19
+
16
20
  const InputSearch = forwardRef(
17
21
  (
18
22
  {
@@ -29,6 +33,8 @@ const InputSearch = forwardRef(
29
33
  style,
30
34
  defaultValue,
31
35
  onPressButtonText,
36
+ params,
37
+ componentId,
32
38
  ...props
33
39
  }: InputSearchProps,
34
40
  ref,
@@ -37,7 +43,7 @@ const InputSearch = forwardRef(
37
43
  const [focused, setFocused] = useState(false);
38
44
  const [haveValue, setHaveValue] = useState(!!value || !!defaultValue);
39
45
  const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
40
- const accessibilityLabel = `InputMoney/${placeholder}`;
46
+ const screenInfo = useContext<any>(ScreenContext);
41
47
 
42
48
  const _onFocus = (e: NativeSyntheticEvent<TextInputFocusEventData>) => {
43
49
  setFocused(true);
@@ -63,7 +69,6 @@ const InputSearch = forwardRef(
63
69
  return (
64
70
  <TextInput
65
71
  {...props}
66
- accessibilityLabel={accessibilityLabel}
67
72
  textAlignVertical="center"
68
73
  ref={inputRef}
69
74
  style={[
@@ -118,36 +123,56 @@ const InputSearch = forwardRef(
118
123
  </View>
119
124
  );
120
125
  };
126
+
127
+ let inputState = 'empty';
128
+
129
+ if (focused) {
130
+ inputState = 'focus';
131
+ }
132
+
133
+ if (value && value?.length > 0) {
134
+ inputState = 'filled';
135
+ }
136
+
121
137
  return (
122
- <View
123
- style={[style, styles.searchInputContainer]}
124
- accessibilityLabel={accessibilityLabel}>
125
- <View
126
- style={[
127
- styles.searchInputWrapper,
128
- {
129
- backgroundColor: theme.colors.background.surface,
130
- borderColor: theme.colors.background.surface,
131
- },
132
- showBorder && {borderColor: theme.colors.border.default},
133
- focused && {borderColor: theme.colors.primary},
134
- ]}>
135
- <Icon
136
- source={'navigation_search'}
137
- size={24}
138
- color={theme.colors.text.hint}
139
- />
140
- {renderInputView()}
141
- {renderIconView()}
138
+ <ScreenContext.Provider
139
+ value={{
140
+ ...screenInfo,
141
+ componentName: 'InputSearch',
142
+ params,
143
+ state: inputState,
144
+ componentId,
145
+ }}>
146
+ <View style={[style, styles.searchInputContainer]}>
147
+ <View
148
+ style={[
149
+ styles.searchInputWrapper,
150
+ {
151
+ backgroundColor: theme.colors.background.surface,
152
+ borderColor: theme.colors.background.surface,
153
+ },
154
+ showBorder && {borderColor: theme.colors.border.default},
155
+ focused && {borderColor: theme.colors.primary},
156
+ ]}>
157
+ <Icon
158
+ source={'navigation_search'}
159
+ size={24}
160
+ color={theme.colors.text.hint}
161
+ />
162
+ {renderInputView()}
163
+ {renderIconView()}
164
+ </View>
165
+ {showButtonText && (
166
+ <TouchableOpacity onPress={onPressButtonText}>
167
+ <Text
168
+ typography={'action_default_bold'}
169
+ style={styles.textButton}>
170
+ {buttonText}
171
+ </Text>
172
+ </TouchableOpacity>
173
+ )}
142
174
  </View>
143
- {showButtonText && (
144
- <TouchableOpacity onPress={onPressButtonText}>
145
- <Text typography={'action_default_bold'} style={styles.textButton}>
146
- {buttonText}
147
- </Text>
148
- </TouchableOpacity>
149
- )}
150
- </View>
175
+ </ScreenContext.Provider>
151
176
  );
152
177
  },
153
178
  );
@@ -46,7 +46,6 @@ const InputTextArea = forwardRef(
46
46
  const [focused, setFocused] = useState(false);
47
47
  const [inputValue, setInputValue] = useState(defaultValue ?? '');
48
48
  const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
49
- const accessibilityLabel = `InputTextArea/${floatingValue ?? placeholder}`;
50
49
 
51
50
  const onClearText = () => {
52
51
  inputRef?.current?.clear();
@@ -110,7 +109,6 @@ const InputTextArea = forwardRef(
110
109
  <View style={styles.textAreaView}>
111
110
  <TextInput
112
111
  {...props}
113
- accessibilityLabel={accessibilityLabel}
114
112
  ref={inputRef}
115
113
  editable={!disabled}
116
114
  textAlignVertical="top"
@@ -150,9 +148,7 @@ const InputTextArea = forwardRef(
150
148
  };
151
149
 
152
150
  return (
153
- <View
154
- style={[style, styles.wrapper]}
155
- accessibilityLabel={accessibilityLabel}>
151
+ <View style={[style, styles.wrapper]}>
156
152
  {renderInputView()}
157
153
  <ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
158
154
  </View>
package/Input/index.tsx CHANGED
@@ -80,6 +80,9 @@ export interface InputProps extends TextInputProps {
80
80
  fontWeight?: 'Regular' | 'Bold';
81
81
 
82
82
  onPressIcon?: () => void;
83
+
84
+ params?: any;
85
+ componentId?: string;
83
86
  }
84
87
 
85
88
  type InputPropsWithoutSizeAndIcon = Omit<
@@ -126,6 +129,10 @@ export interface InputSearchProps extends TextInputProps {
126
129
  * Optional. Represents the name or key of the icon to be displayed in the Input component.
127
130
  */
128
131
  icon?: string;
132
+
133
+ params?: any;
134
+
135
+ componentId?: string;
129
136
  }
130
137
 
131
138
  export interface InputMoneyProps extends InputPropsWithoutPlaceholder {}
@@ -250,6 +257,10 @@ export interface InputDropDownProps {
250
257
  leadingIconColor?: string;
251
258
 
252
259
  style: ViewStyle | ViewStyle[];
260
+
261
+ params?: any
262
+ componentId?: string;
263
+
253
264
  }
254
265
 
255
266
  export {Input, InputTextArea, InputSearch, InputMoney, InputOTP, InputDropDown};
package/Input/styles.ts CHANGED
@@ -53,8 +53,7 @@ export default StyleSheet.create({
53
53
  marginRight: Spacing.M,
54
54
  },
55
55
  icon: {
56
- width: 24,
57
- height: 24,
56
+ marginLeft: Spacing.S
58
57
  },
59
58
  iconWrapper: {
60
59
  width: 24,
package/Layout/Card.tsx CHANGED
@@ -144,7 +144,6 @@ const Card: React.FC<CardProps> = ({
144
144
  <GridContext.Provider value={gridContext}>
145
145
  <View
146
146
  {...props}
147
- accessibilityLabel={`Card`}
148
147
  style={[
149
148
  {backgroundColor: theme.colors.background.surface},
150
149
  style,
package/Layout/Item.tsx CHANGED
@@ -37,7 +37,6 @@ const Item: React.FC<ItemProps> = ({
37
37
 
38
38
  return (
39
39
  <View
40
- accessibilityLabel={`Item`}
41
40
  style={[
42
41
  style,
43
42
  styles.item,
package/Layout/Screen.tsx CHANGED
@@ -301,9 +301,7 @@ const Screen = forwardRef(
301
301
  };
302
302
 
303
303
  return (
304
- <View
305
- style={[Styles.flex, {backgroundColor}]}
306
- accessibilityLabel={`ScreenContainer`}>
304
+ <View style={[Styles.flex, {backgroundColor}]}>
307
305
  {!!headerBackground && (
308
306
  <>
309
307
  <Image
@@ -151,7 +151,6 @@ const Section: React.FC<SectionProps> = ({
151
151
  }}>
152
152
  <View
153
153
  {...props}
154
- accessibilityLabel={`Section`}
155
154
  style={[
156
155
  style,
157
156
  styles.protectedStyle,
@@ -31,7 +31,6 @@ const PaginationScroll: FC<ScrollIndicatorProps> = ({
31
31
  const renderScrollView = () => {
32
32
  return (
33
33
  <Animated.ScrollView
34
- accessibilityLabel={'PaginationScroll'}
35
34
  ref={scrollViewRef}
36
35
  onScroll={Animated.event(
37
36
  [
@@ -182,7 +182,6 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
182
182
 
183
183
  return (
184
184
  <View
185
- accessibilityLabel={'PopupNotify'}
186
185
  style={[
187
186
  styles.container,
188
187
  {backgroundColor: theme.colors.background.surface},
@@ -77,7 +77,7 @@ const PopupPromotion: React.FC<PopupPromotionProps> = ({
77
77
  };
78
78
 
79
79
  return (
80
- <View accessibilityLabel={'PopupPromotion'}>
80
+ <View>
81
81
  <Image
82
82
  source={{
83
83
  uri: image,
package/Radio/index.tsx CHANGED
@@ -6,6 +6,10 @@ import {Text} from '../Text';
6
6
  import styles from './styles';
7
7
  import {ApplicationContext} from '../Application';
8
8
  import {Spacing} from '../Consts';
9
+ import {formatNameLength} from '../Application/utils';
10
+ const {
11
+ ScreenContext,
12
+ } = require('react-native/Libraries/Components/ScreenContext');
9
13
 
10
14
  const Radio: FC<RadioProps> = ({
11
15
  value,
@@ -14,8 +18,11 @@ const Radio: FC<RadioProps> = ({
14
18
  onChange,
15
19
  label,
16
20
  style,
21
+ params,
22
+ componentId,
17
23
  }) => {
18
24
  const {theme} = useContext(ApplicationContext);
25
+ const screenInfo = useContext<any>(ScreenContext);
19
26
  const selected = value === groupValue;
20
27
  let disabledStyle = {};
21
28
  let checkBoxStyle = {
@@ -37,28 +44,43 @@ const Radio: FC<RadioProps> = ({
37
44
  };
38
45
  }
39
46
 
47
+ const component_name = formatNameLength(label || '');
48
+
40
49
  return (
41
- <TouchableOpacity
42
- accessibilityLabel={`Radio/${label}/${value}`}
43
- onPress={onChange}
44
- disabled={disabled}
45
- style={[
46
- style,
47
- {
48
- flexDirection: 'row',
49
- alignItems: 'center',
50
+ <ScreenContext.Provider
51
+ value={{
52
+ ...screenInfo,
53
+ componentName: 'Button',
54
+ params: {
55
+ ...params,
56
+ component_name,
50
57
  },
51
- ]}>
52
- <View
58
+ state: disabled ? 'disabled' : 'enabled',
59
+ componentId,
60
+ componentValue: value,
61
+ action: 'click',
62
+ }}>
63
+ <TouchableOpacity
64
+ onPress={onChange}
65
+ disabled={disabled}
53
66
  style={[
54
- styles.radio,
55
- checkBoxStyle,
56
- disabledStyle,
57
- {marginRight: label ? Spacing.XS : 0},
58
- ]}
59
- />
60
- {!!label && <Text typography={'body_default_regular'}>{label}</Text>}
61
- </TouchableOpacity>
67
+ style,
68
+ {
69
+ flexDirection: 'row',
70
+ alignItems: 'center',
71
+ },
72
+ ]}>
73
+ <View
74
+ style={[
75
+ styles.radio,
76
+ checkBoxStyle,
77
+ disabledStyle,
78
+ {marginRight: label ? Spacing.XS : 0},
79
+ ]}
80
+ />
81
+ {!!label && <Text typography={'body_default_regular'}>{label}</Text>}
82
+ </TouchableOpacity>
83
+ </ScreenContext.Provider>
62
84
  );
63
85
  };
64
86
 
package/Radio/types.ts CHANGED
@@ -35,4 +35,9 @@ export type RadioProps = {
35
35
  * Accepts an object of style properties.
36
36
  */
37
37
  style?: ViewStyle;
38
+
39
+
40
+ params?: any
41
+
42
+ componentId?: string
38
43
  };
@@ -41,7 +41,7 @@ const Skeleton: React.FC<SkeletonTypes> = ({style}) => {
41
41
  }
42
42
  };
43
43
  return (
44
- <View style={[styles.container, style]} accessibilityLabel={'Skeleton'}>
44
+ <View style={[styles.container, style]}>
45
45
  <View
46
46
  onLayout={e => onLayout(e.nativeEvent.layout.width)}
47
47
  style={[Styles.flex, {backgroundColor: PRIMARY_COLOR}]}>
package/Switch/index.tsx CHANGED
@@ -1,11 +1,17 @@
1
- import React, {FC} from 'react';
1
+ import React, {FC, useContext} from 'react';
2
2
  import {TouchableOpacity, View} from 'react-native';
3
3
  import {SwitchProps} from './types';
4
4
  import styles from './styles';
5
5
  import {Colors} from '../Consts';
6
6
 
7
+ const {
8
+ ScreenContext,
9
+ } = require('react-native/Libraries/Components/ScreenContext');
10
+
7
11
  const Switch: FC<SwitchProps> = props => {
8
- const {value, onChange, disabled, style} = props;
12
+ const {value, onChange, disabled, style, params, componentId} = props;
13
+ const screenInfo = useContext<any>(ScreenContext);
14
+
9
15
  const circleBackgroundColor = value ? Colors.black_01 : Colors.black_03;
10
16
  const circleAlign = value ? 'flex-end' : 'flex-start';
11
17
 
@@ -15,19 +21,29 @@ const Switch: FC<SwitchProps> = props => {
15
21
  }
16
22
 
17
23
  return (
18
- <TouchableOpacity
19
- accessibilityLabel={'Switch'}
20
- disabled={disabled}
21
- onPress={() => onChange?.(!value)}
22
- style={[
23
- style,
24
- styles.container,
25
- {backgroundColor, alignItems: circleAlign},
26
- ]}>
27
- <View style={[styles.circle, {backgroundColor: circleBackgroundColor}]}>
28
- <View style={[styles.circleSmall, {backgroundColor}]} />
29
- </View>
30
- </TouchableOpacity>
24
+ <ScreenContext.Provider
25
+ value={{
26
+ ...screenInfo,
27
+ componentName: 'Button',
28
+ params,
29
+ state: disabled ? 'disabled' : 'enabled',
30
+ componentId,
31
+ componentValue: value,
32
+ action: 'click',
33
+ }}>
34
+ <TouchableOpacity
35
+ disabled={disabled}
36
+ onPress={() => onChange?.(!value)}
37
+ style={[
38
+ style,
39
+ styles.container,
40
+ {backgroundColor, alignItems: circleAlign},
41
+ ]}>
42
+ <View style={[styles.circle, {backgroundColor: circleBackgroundColor}]}>
43
+ <View style={[styles.circleSmall, {backgroundColor}]} />
44
+ </View>
45
+ </TouchableOpacity>
46
+ </ScreenContext.Provider>
31
47
  );
32
48
  };
33
49
 
package/Switch/types.ts CHANGED
@@ -23,4 +23,8 @@ export type SwitchProps = {
23
23
  * Accepts an object of style properties.
24
24
  */
25
25
  style?: ViewStyle;
26
+
27
+ params?: any
28
+
29
+ componentId?: string
26
30
  };
package/Tag/index.tsx CHANGED
@@ -60,9 +60,7 @@ const Tag: FC<TagProps> = ({
60
60
  }
61
61
 
62
62
  return (
63
- <View
64
- style={[style, sizeStyle, {backgroundColor: tagColor}]}
65
- accessibilityLabel={`Tag/${label}`}>
63
+ <View style={[style, sizeStyle, {backgroundColor: tagColor}]}>
66
64
  {!!icon && (
67
65
  <Icon
68
66
  style={styles.icon}