unicorn-demo-app 7.3.2 → 7.3.3
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.
- package/package.json +1 -1
- package/src/screens/PlaygroundScreen.tsx +1 -6
- package/src/screens/componentScreens/ActionBarScreen.tsx +3 -7
- package/src/screens/componentScreens/AvatarsScreen.tsx +6 -6
- package/src/screens/componentScreens/BasicListScreen.tsx +0 -1
- package/src/screens/componentScreens/ButtonsScreen.tsx +11 -13
- package/src/screens/componentScreens/CarouselScreen.tsx +1 -1
- package/src/screens/componentScreens/ChipsInputScreen.tsx +1 -1
- package/src/screens/componentScreens/ColorPickerScreen.tsx +1 -1
- package/src/screens/componentScreens/DrawerScreen.tsx +39 -56
- package/src/screens/componentScreens/GridViewScreen.tsx +3 -3
- package/src/screens/componentScreens/HintsScreen.tsx +2 -2
- package/src/screens/componentScreens/ModalScreen.tsx +1 -1
- package/src/screens/componentScreens/OverlaysScreen.tsx +2 -2
- package/src/screens/componentScreens/PanDismissibleScreen.tsx +1 -1
- package/src/screens/componentScreens/PanListenerScreen.tsx +3 -4
- package/src/screens/componentScreens/ScrollBarScreen.tsx +2 -3
- package/src/screens/componentScreens/SectionsWheelPickerScreen.tsx +1 -1
- package/src/screens/componentScreens/SliderScreen.tsx +24 -8
- package/src/screens/componentScreens/TabControllerScreen/index.tsx +3 -4
- package/src/screens/componentScreens/TextFieldScreen.tsx +1 -1
- package/src/screens/componentScreens/WheelPickerScreen.tsx +2 -2
- package/src/screens/componentScreens/WizardScreen.tsx +4 -3
- package/src/screens/incubatorScreens/IncubatorExpandableOverlayScreen.tsx +6 -6
- package/src/screens/incubatorScreens/IncubatorSliderScreen.tsx +5 -0
- package/src/screens/incubatorScreens/IncubatorToastScreen.tsx +3 -2
- package/src/screens/realExamples/Pinterest/index.tsx +14 -6
- package/src/screens/realExamples/ProductPage/index.tsx +17 -9
- package/src/screens/realExamples/Twitter/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {View, Text, Card, TextField, Button} from 'react-native-ui-lib'; //eslint-disable-line
|
|
2
|
+
import {View, Text, Card, TextField, Button} from 'react-native-ui-lib';
|
|
4
3
|
|
|
5
4
|
export default class PlaygroundScreen extends Component {
|
|
6
5
|
render() {
|
|
@@ -19,7 +18,3 @@ export default class PlaygroundScreen extends Component {
|
|
|
19
18
|
);
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
const styles = StyleSheet.create({
|
|
24
|
-
container: {}
|
|
25
|
-
});
|
|
@@ -9,13 +9,9 @@ import collections from '../../assets/icons/collections.png';
|
|
|
9
9
|
import richText from '../../assets/icons/richText.png';
|
|
10
10
|
|
|
11
11
|
export default class ActionBarScreen extends Component {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.state = {
|
|
16
|
-
currentPage: 0
|
|
17
|
-
};
|
|
18
|
-
}
|
|
12
|
+
state = {
|
|
13
|
+
currentPage: 0
|
|
14
|
+
};
|
|
19
15
|
|
|
20
16
|
render() {
|
|
21
17
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import React, {Component} from 'react';
|
|
3
3
|
import {ScrollView, StyleSheet, Alert} from 'react-native';
|
|
4
|
-
import {Avatar, AvatarHelper, View, Text, Colors, Typography} from 'react-native-ui-lib';
|
|
4
|
+
import {Avatar, AvatarHelper, View, Text, Colors, Typography, AvatarProps} from 'react-native-ui-lib';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
const star = require('../../assets/icons/star.png');
|
|
@@ -25,7 +25,7 @@ const examples = [
|
|
|
25
25
|
'https://lh3.googleusercontent.com/-cw77lUnOvmI/AAAAAAAAAAI/AAAAAAAAAAA/WMNck32dKbc/s181-c/104220521160525129167.jpg'
|
|
26
26
|
},
|
|
27
27
|
badgeProps: {size: 10, backgroundColor: Colors.$backgroundWarningHeavy},
|
|
28
|
-
badgePosition: 'BOTTOM_RIGHT'
|
|
28
|
+
badgePosition: 'BOTTOM_RIGHT' as AvatarProps['badgePosition']
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
{
|
|
@@ -36,7 +36,7 @@ const examples = [
|
|
|
36
36
|
'https://lh3.googleusercontent.com/-CMM0GmT5tiI/AAAAAAAAAAI/AAAAAAAAAAA/-o9gKbC6FVo/s181-c/111308920004613908895.jpg'
|
|
37
37
|
},
|
|
38
38
|
badgeProps: {size: 10, backgroundColor: Colors.$backgroundDisabled},
|
|
39
|
-
badgePosition: 'BOTTOM_LEFT'
|
|
39
|
+
badgePosition: 'BOTTOM_LEFT' as AvatarProps['badgePosition']
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
title: 'Image with fade in animation',
|
|
@@ -53,7 +53,7 @@ const examples = [
|
|
|
53
53
|
uri: 'https://randomuser.me/api/portraits/women/24.jpg'
|
|
54
54
|
},
|
|
55
55
|
badgeProps: {size: 14, borderWidth: 0, backgroundColor: onlineColor},
|
|
56
|
-
badgePosition: 'TOP_LEFT'
|
|
56
|
+
badgePosition: 'TOP_LEFT' as AvatarProps['badgePosition']
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
title: 'Icon badge',
|
|
@@ -102,7 +102,7 @@ const examples = [
|
|
|
102
102
|
title: 'With custom badge label',
|
|
103
103
|
label: 'LD',
|
|
104
104
|
backgroundColor: Colors.$backgroundDangerLight,
|
|
105
|
-
badgePosition: 'BOTTOM_RIGHT',
|
|
105
|
+
badgePosition: 'BOTTOM_RIGHT' as AvatarProps['badgePosition'],
|
|
106
106
|
badgeProps: {
|
|
107
107
|
label: '+2',
|
|
108
108
|
size: 24,
|
|
@@ -123,7 +123,7 @@ export default class AvatarsScreen extends Component {
|
|
|
123
123
|
patchedGravatar ? `Patched-uri: ${patchedGravatar}` : ''
|
|
124
124
|
}`;
|
|
125
125
|
Alert.alert(title, message);
|
|
126
|
-
}
|
|
126
|
+
};
|
|
127
127
|
|
|
128
128
|
render() {
|
|
129
129
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {ScrollView, StyleSheet, Alert, Image} from 'react-native';
|
|
3
|
-
import {Text, View, Assets, Constants, Button, Colors, Typography} from 'react-native-ui-lib';
|
|
3
|
+
import {Text, View, Assets, Constants, Button, Colors, Typography, ButtonProps} from 'react-native-ui-lib';
|
|
4
4
|
|
|
5
5
|
const ButtonSpace = 20;
|
|
6
6
|
const plusIcon = Assets.getAssetByPath('icons.demo.plus');
|
|
@@ -9,16 +9,12 @@ const labelButton = {label: 'Animated'};
|
|
|
9
9
|
const iconButton = {round: true};
|
|
10
10
|
|
|
11
11
|
export default class ButtonsScreen extends Component {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// outline: true,
|
|
19
|
-
buttonProps: labelButton
|
|
20
|
-
};
|
|
21
|
-
}
|
|
12
|
+
state = {
|
|
13
|
+
backgroundColor: Colors.yellow30,
|
|
14
|
+
label: 'Button',
|
|
15
|
+
// outline: true,
|
|
16
|
+
buttonProps: labelButton as ButtonProps
|
|
17
|
+
};
|
|
22
18
|
|
|
23
19
|
changeProps = () => {
|
|
24
20
|
if (this.state.buttonProps === labelButton) {
|
|
@@ -241,9 +237,11 @@ export default class ButtonsScreen extends Component {
|
|
|
241
237
|
style={{
|
|
242
238
|
width: 20,
|
|
243
239
|
height: 20,
|
|
244
|
-
|
|
240
|
+
// @ts-expect-error
|
|
241
|
+
backgroundColor: iconStyle[0]?.tintColor,
|
|
245
242
|
borderRadius: 10,
|
|
246
|
-
|
|
243
|
+
// @ts-expect-error
|
|
244
|
+
marginRight: iconStyle[0]?.marginRight
|
|
247
245
|
}}
|
|
248
246
|
/>
|
|
249
247
|
)}
|
|
@@ -117,7 +117,7 @@ class CarouselScreen extends Component<Props, State> {
|
|
|
117
117
|
pageControlProps={{onPagePress: this.onPagePress, limitShownPages}}
|
|
118
118
|
allowAccessibleLayout
|
|
119
119
|
>
|
|
120
|
-
{_.map([...Array(numberOfPagesShown)], (
|
|
120
|
+
{_.map([...Array(numberOfPagesShown)], (_item, index) => (
|
|
121
121
|
<Page style={{backgroundColor: BACKGROUND_COLORS[index]}} key={index}>
|
|
122
122
|
<Text margin-15>CARD {index}</Text>
|
|
123
123
|
</Page>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
|
-
import {View, Text,
|
|
2
|
+
import {View, Text, Colors, ChipsInput} from 'react-native-ui-lib';
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
|
|
5
5
|
export default class ChipsInputScreen extends Component {
|
|
@@ -1,61 +1,48 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {StyleSheet, ScrollView, LayoutAnimation} from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
Assets,
|
|
5
|
-
Colors,
|
|
6
|
-
Typography,
|
|
7
|
-
View,
|
|
8
|
-
Drawer,
|
|
9
|
-
Text,
|
|
10
|
-
Button,
|
|
11
|
-
Avatar,
|
|
12
|
-
Badge
|
|
13
|
-
} from 'react-native-ui-lib'; //eslint-disable-line
|
|
3
|
+
import {Assets, Colors, Typography, View, Drawer, Text, Button, Avatar, Badge, DrawerProps} from 'react-native-ui-lib';
|
|
14
4
|
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
15
5
|
import conversations from '../../data/conversations';
|
|
16
6
|
|
|
17
|
-
import {
|
|
18
|
-
renderBooleanOption,
|
|
19
|
-
renderSliderOption,
|
|
20
|
-
renderColorOption
|
|
21
|
-
} from '../ExampleScreenPresenter';
|
|
7
|
+
import {renderBooleanOption, renderSliderOption, renderColorOption} from '../ExampleScreenPresenter';
|
|
22
8
|
|
|
23
9
|
const ITEMS = {
|
|
24
10
|
read: {
|
|
25
11
|
icon: require('../../assets/icons/mail.png'),
|
|
26
12
|
text: 'Read',
|
|
27
13
|
background: Colors.green30,
|
|
28
|
-
testID:
|
|
14
|
+
testID: 'left_item_read'
|
|
29
15
|
},
|
|
30
16
|
archive: {
|
|
31
17
|
icon: require('../../assets/icons/archive.png'),
|
|
32
18
|
text: 'Archive',
|
|
33
19
|
background: Colors.blue30,
|
|
34
|
-
testID:
|
|
20
|
+
testID: 'right_item_archive'
|
|
35
21
|
},
|
|
36
22
|
delete: {
|
|
37
23
|
icon: require('../../assets/icons/delete.png'),
|
|
38
24
|
text: 'Delete',
|
|
39
25
|
background: Colors.red30,
|
|
40
|
-
testID:
|
|
26
|
+
testID: 'right_item_delete'
|
|
41
27
|
}
|
|
42
28
|
};
|
|
43
29
|
|
|
44
30
|
class DrawerScreen extends Component {
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
state = {
|
|
32
|
+
hideItem: false,
|
|
33
|
+
showRightItems: true,
|
|
34
|
+
fullSwipeRight: true,
|
|
35
|
+
showLeftItem: true,
|
|
36
|
+
fullSwipeLeft: true,
|
|
37
|
+
unread: true,
|
|
38
|
+
itemsTintColor: undefined,
|
|
39
|
+
bounciness: undefined,
|
|
40
|
+
itemsIconSize: undefined
|
|
41
|
+
};
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
hideItem: false,
|
|
50
|
-
showRightItems: true,
|
|
51
|
-
fullSwipeRight: true,
|
|
52
|
-
showLeftItem: true,
|
|
53
|
-
fullSwipeLeft: true,
|
|
54
|
-
unread: true
|
|
55
|
-
};
|
|
56
|
-
}
|
|
43
|
+
ref: React.Ref<typeof Drawer> = null;
|
|
57
44
|
|
|
58
|
-
componentDidUpdate(
|
|
45
|
+
componentDidUpdate(_prevProps: any, prevState: typeof this.state) {
|
|
59
46
|
if (this.state.hideItem && prevState.hideItem) {
|
|
60
47
|
this.showItem();
|
|
61
48
|
}
|
|
@@ -82,7 +69,7 @@ class DrawerScreen extends Component {
|
|
|
82
69
|
|
|
83
70
|
toggleReadState = () => {
|
|
84
71
|
this.setState({unread: !this.state.unread});
|
|
85
|
-
}
|
|
72
|
+
};
|
|
86
73
|
|
|
87
74
|
showItem = () => {
|
|
88
75
|
this.setState({hideItem: false});
|
|
@@ -90,31 +77,37 @@ class DrawerScreen extends Component {
|
|
|
90
77
|
|
|
91
78
|
openLeftDrawer = () => {
|
|
92
79
|
if (this.ref) {
|
|
80
|
+
// @ts-expect-error
|
|
93
81
|
this.ref.openLeft();
|
|
94
82
|
}
|
|
95
83
|
};
|
|
96
84
|
openLeftDrawerFull = () => {
|
|
97
85
|
if (this.ref) {
|
|
86
|
+
// @ts-expect-error
|
|
98
87
|
this.ref.openLeftFull();
|
|
99
88
|
}
|
|
100
89
|
};
|
|
101
90
|
toggleLeftDrawer = () => {
|
|
102
91
|
if (this.ref) {
|
|
92
|
+
// @ts-expect-error
|
|
103
93
|
this.ref.toggleLeft();
|
|
104
94
|
}
|
|
105
95
|
};
|
|
106
96
|
openRightDrawer = () => {
|
|
107
97
|
if (this.ref) {
|
|
98
|
+
// @ts-expect-error
|
|
108
99
|
this.ref.openRight();
|
|
109
100
|
}
|
|
110
101
|
};
|
|
111
102
|
openRightDrawerFull = () => {
|
|
112
103
|
if (this.ref) {
|
|
104
|
+
// @ts-expect-error
|
|
113
105
|
this.ref.openRightFull();
|
|
114
106
|
}
|
|
115
107
|
};
|
|
116
108
|
closeDrawer = () => {
|
|
117
109
|
if (this.ref) {
|
|
110
|
+
// @ts-expect-error
|
|
118
111
|
this.ref.closeDrawer();
|
|
119
112
|
}
|
|
120
113
|
};
|
|
@@ -149,13 +142,7 @@ class DrawerScreen extends Component {
|
|
|
149
142
|
</View>
|
|
150
143
|
|
|
151
144
|
<View marginH-20>
|
|
152
|
-
<Button
|
|
153
|
-
onPress={this.closeDrawer}
|
|
154
|
-
label="Close"
|
|
155
|
-
style={{margin: 3}}
|
|
156
|
-
size={'xSmall'}
|
|
157
|
-
testID="close_btn"
|
|
158
|
-
/>
|
|
145
|
+
<Button onPress={this.closeDrawer} label="Close" style={{margin: 3}} size={'xSmall'} testID="close_btn"/>
|
|
159
146
|
</View>
|
|
160
147
|
|
|
161
148
|
<View>
|
|
@@ -192,10 +179,14 @@ class DrawerScreen extends Component {
|
|
|
192
179
|
style={{borderBottomWidth: 1, borderColor: Colors.grey60}}
|
|
193
180
|
testID="drawer_item"
|
|
194
181
|
>
|
|
195
|
-
{this.state.unread &&
|
|
182
|
+
{this.state.unread && (
|
|
183
|
+
<Badge testID="drawer_item_badge" size={6} backgroundColor={Colors.red30} containerStyle={{marginRight: 8}}/>
|
|
184
|
+
)}
|
|
196
185
|
<Avatar source={{uri: data.thumbnail}}/>
|
|
197
186
|
<View marginL-20>
|
|
198
|
-
<Text text70R={!this.state.unread} text70BO={this.state.unread}>
|
|
187
|
+
<Text text70R={!this.state.unread} text70BO={this.state.unread}>
|
|
188
|
+
{data.name}
|
|
189
|
+
</Text>
|
|
199
190
|
<Text text80 marginT-2>
|
|
200
191
|
{data.text}
|
|
201
192
|
</Text>
|
|
@@ -216,11 +207,12 @@ class DrawerScreen extends Component {
|
|
|
216
207
|
hideItem
|
|
217
208
|
} = this.state;
|
|
218
209
|
|
|
219
|
-
const drawerProps = {
|
|
210
|
+
const drawerProps: DrawerProps = {
|
|
220
211
|
itemsTintColor,
|
|
221
212
|
itemsIconSize,
|
|
222
213
|
bounciness,
|
|
223
|
-
|
|
214
|
+
// @ts-expect-error
|
|
215
|
+
ref: component => (this.ref = component),
|
|
224
216
|
fullSwipeRight,
|
|
225
217
|
onFullSwipeRight: this.deleteItem,
|
|
226
218
|
fullSwipeLeft,
|
|
@@ -236,7 +228,7 @@ class DrawerScreen extends Component {
|
|
|
236
228
|
drawerProps.leftItem = {
|
|
237
229
|
...ITEMS.read,
|
|
238
230
|
icon: this.state.unread ? require('../../assets/icons/mail.png') : require('../../assets/icons/refresh.png'),
|
|
239
|
-
text: !this.state.unread ? 'Unread' : 'Read',
|
|
231
|
+
text: !this.state.unread ? 'Unread' : 'Read',
|
|
240
232
|
background: this.state.unread ? Colors.green30 : Colors.orange30,
|
|
241
233
|
onPress: this.toggleReadState
|
|
242
234
|
};
|
|
@@ -265,22 +257,13 @@ class DrawerScreen extends Component {
|
|
|
265
257
|
</>
|
|
266
258
|
)}
|
|
267
259
|
|
|
268
|
-
<ScrollView
|
|
269
|
-
style={styles.container}
|
|
270
|
-
contentContainerStyle={styles.contentContainer}
|
|
271
|
-
>
|
|
260
|
+
<ScrollView style={styles.container} contentContainerStyle={styles.contentContainer}>
|
|
272
261
|
<View padding-20>
|
|
273
262
|
{this.renderActions()}
|
|
274
263
|
{renderBooleanOption.call(this, 'rightItems', 'showRightItems')}
|
|
275
|
-
{showRightItems &&
|
|
276
|
-
renderBooleanOption.call(
|
|
277
|
-
this,
|
|
278
|
-
'fullSwipeRight',
|
|
279
|
-
'fullSwipeRight'
|
|
280
|
-
)}
|
|
264
|
+
{showRightItems && renderBooleanOption.call(this, 'fullSwipeRight', 'fullSwipeRight')}
|
|
281
265
|
{renderBooleanOption.call(this, 'leftItem', 'showLeftItem')}
|
|
282
|
-
{showLeftItem &&
|
|
283
|
-
renderBooleanOption.call(this, 'fullSwipeLeft', 'fullSwipeLeft')}
|
|
266
|
+
{showLeftItem && renderBooleanOption.call(this, 'fullSwipeLeft', 'fullSwipeLeft')}
|
|
284
267
|
{renderColorOption.call(this, 'icon+text color', 'itemsTintColor')}
|
|
285
268
|
{renderSliderOption.call(this, 'bounciness', 'bounciness', {
|
|
286
269
|
min: 5,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import {View, Text, Image, Colors, Constants, Avatar, GridView, Card} from 'react-native-ui-lib';
|
|
2
|
+
import {View, Text, Image, Colors, Constants, Avatar, GridView, Card, GridViewProps} from 'react-native-ui-lib';
|
|
3
3
|
import React, {Component} from 'react';
|
|
4
4
|
import {Alert, ScrollView} from 'react-native';
|
|
5
5
|
import conversations from '../../data/conversations';
|
|
@@ -30,7 +30,7 @@ class GridViewScreen extends Component {
|
|
|
30
30
|
return <Text text={product.price} style={{alignSelf: 'center', marginTop: 3}}/>;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
})))(products),
|
|
33
|
+
})))(products) as GridViewProps['items'],
|
|
34
34
|
pairs: _.flow(products => _.take(products, 2),
|
|
35
35
|
(products: any[]) =>
|
|
36
36
|
_.map(products, product => ({
|
|
@@ -102,7 +102,7 @@ class GridViewScreen extends Component {
|
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
})))(products),
|
|
105
|
+
})))(products) as GridViewProps['items'],
|
|
106
106
|
|
|
107
107
|
avatars: _.flow(products => _.take(products, 9),
|
|
108
108
|
(products: any[]) =>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import React, {Component} from 'react';
|
|
3
|
-
import {Alert} from 'react-native';
|
|
3
|
+
import {Alert, ViewStyle} from 'react-native';
|
|
4
4
|
import {Colors, View, Text, Hint, Button, Assets, Incubator} from 'react-native-ui-lib';
|
|
5
5
|
import {renderMultipleSegmentOptions, renderBooleanOption} from '../ExampleScreenPresenter';
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ export default class HintsScreen extends Component<HintScreenProps> {
|
|
|
16
16
|
useShortMessage: false,
|
|
17
17
|
showBottomHint: false,
|
|
18
18
|
showIcon: false,
|
|
19
|
-
targetPosition: 'flex-start',
|
|
19
|
+
targetPosition: 'flex-start' as ViewStyle['alignSelf'],
|
|
20
20
|
useBackdrop: true,
|
|
21
21
|
useTargetFrame: false,
|
|
22
22
|
useSideTip: false,
|
|
@@ -11,11 +11,11 @@ const uri = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export default class OverlaysScreen extends Component {
|
|
14
|
-
getImageWithOverlay = (type, text,
|
|
14
|
+
getImageWithOverlay = (type: string | undefined, text: string, customOverlay?: JSX.Element) => {
|
|
15
15
|
return (
|
|
16
16
|
<View centerH>
|
|
17
17
|
<Text grey10>{text}</Text>
|
|
18
|
-
<Image /* overlayColor={Colors.rgba(Colors.red40, 0.4)} */ style={styles.image} source={image} overlayType={type} customOverlayContent={
|
|
18
|
+
<Image /* overlayColor={Colors.rgba(Colors.red40, 0.4)} */ style={styles.image} source={image} overlayType={type} customOverlayContent={customOverlay}/>
|
|
19
19
|
</View>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
@@ -64,7 +64,7 @@ export default class PanDismissibleScreen extends Component {
|
|
|
64
64
|
<PanningProvider>
|
|
65
65
|
{!isCoupled && panListener}
|
|
66
66
|
<PanDismissibleView
|
|
67
|
-
key={key}
|
|
67
|
+
key={key.toString()}
|
|
68
68
|
style={[styles.panDismissible, {marginTop: isCoupled ? PAN_LISTENER_VIEW_HEIGHT : undefined}]}
|
|
69
69
|
>
|
|
70
70
|
{isCoupled && panListener}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
1
|
import React, {Component} from 'react';
|
|
3
|
-
import {View, Text, PanListenerView,
|
|
2
|
+
import {View, Text, PanListenerView, PanDirectionsProps, PanAmountsProps} from 'react-native-ui-lib';
|
|
4
3
|
|
|
5
4
|
export default class PanListenerScreen extends Component {
|
|
6
5
|
state = {
|
|
@@ -8,11 +7,11 @@ export default class PanListenerScreen extends Component {
|
|
|
8
7
|
endType: ''
|
|
9
8
|
};
|
|
10
9
|
|
|
11
|
-
onDrag = ({directions
|
|
10
|
+
onDrag = ({directions}: ({directions: PanDirectionsProps, deltas: PanAmountsProps})) => {
|
|
12
11
|
this.setState({locationText: `Dragged: ${directions.x}, ${directions.y}`});
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
onSwipe = ({directions
|
|
14
|
+
onSwipe = ({directions}: ({directions: PanDirectionsProps, velocities: PanAmountsProps})) => {
|
|
16
15
|
this.setState({locationText: `Swiped: ${directions.x}, ${directions.y}`});
|
|
17
16
|
};
|
|
18
17
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {View, Text, ScrollBar, Button} from 'react-native-ui-lib';
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
class ScrollBarScreen extends Component {
|
|
6
5
|
state = {
|
|
7
6
|
selectedIndex: 0
|
|
8
7
|
};
|
|
9
8
|
|
|
10
|
-
focus = ({index}) => {
|
|
9
|
+
focus = ({customValue: index}: {customValue: number}) => {
|
|
11
10
|
this.setState({selectedIndex: index});
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -33,7 +32,7 @@ class ScrollBarScreen extends Component {
|
|
|
33
32
|
'November',
|
|
34
33
|
'December'
|
|
35
34
|
].map((item, index) => {
|
|
36
|
-
return <Button key={item}
|
|
35
|
+
return <Button key={item} customValue={index} label={item} size="small" onPress={this.focus} marginR-s2/>;
|
|
37
36
|
})}
|
|
38
37
|
</ScrollBar>
|
|
39
38
|
</View>
|
|
@@ -29,7 +29,7 @@ const SectionsWheelPickerScreen = () => {
|
|
|
29
29
|
return Constants.isRTL && disableRTL;
|
|
30
30
|
}, [disableRTL]);
|
|
31
31
|
|
|
32
|
-
const getItems = useCallback(values => {
|
|
32
|
+
const getItems = useCallback((values: (number | string)[]) => {
|
|
33
33
|
return _.map(values, item => ({label: '' + item, value: item}));
|
|
34
34
|
}, []);
|
|
35
35
|
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React, {Component, Fragment} from 'react';
|
|
2
2
|
import {StyleSheet, ScrollView} from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Constants,
|
|
5
|
+
Colors,
|
|
6
|
+
View,
|
|
7
|
+
Text,
|
|
8
|
+
Button,
|
|
9
|
+
Icon,
|
|
10
|
+
Slider,
|
|
11
|
+
GradientSlider,
|
|
12
|
+
ColorSliderGroup
|
|
13
|
+
} from 'react-native-ui-lib';
|
|
4
14
|
import {renderBooleanOption} from '../ExampleScreenPresenter';
|
|
5
15
|
|
|
6
16
|
interface SliderScreenProps {
|
|
@@ -41,17 +51,20 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
41
51
|
gradientSlider = React.createRef();
|
|
42
52
|
|
|
43
53
|
resetSlider = () => {
|
|
54
|
+
// @ts-expect-error
|
|
44
55
|
this.slider.current?.reset();
|
|
56
|
+
// @ts-expect-error
|
|
45
57
|
this.rangeSlider.current?.reset();
|
|
58
|
+
// @ts-expect-error
|
|
46
59
|
this.gradientSlider.current?.reset();
|
|
47
|
-
}
|
|
60
|
+
};
|
|
48
61
|
|
|
49
|
-
onSliderRangeChange = (values: {min: number
|
|
62
|
+
onSliderRangeChange = (values: {min: number; max: number}) => {
|
|
50
63
|
const {min, max} = values;
|
|
51
64
|
this.setState({sliderMinValue: min, sliderMaxValue: max});
|
|
52
65
|
};
|
|
53
66
|
|
|
54
|
-
onSliderRangeChange2 = (values: {min: number
|
|
67
|
+
onSliderRangeChange2 = (values: {min: number; max: number}) => {
|
|
55
68
|
const {min, max} = values;
|
|
56
69
|
this.setState({sliderMinValue2: min, sliderMaxValue2: max});
|
|
57
70
|
};
|
|
@@ -62,11 +75,11 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
62
75
|
|
|
63
76
|
onSliderReset = () => {
|
|
64
77
|
this.setState({sliderValue: INITIAL_VALUE});
|
|
65
|
-
}
|
|
78
|
+
};
|
|
66
79
|
|
|
67
80
|
onRangeSliderReset = () => {
|
|
68
81
|
this.setState({sliderMinValue: RANGE_INITIAL_MIN, sliderMaxValue: RANGE_INITIAL_MAX});
|
|
69
|
-
}
|
|
82
|
+
};
|
|
70
83
|
|
|
71
84
|
onGradientValueChange = (value: string, alpha: number) => {
|
|
72
85
|
this.setState({color: value, alpha});
|
|
@@ -78,7 +91,7 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
78
91
|
|
|
79
92
|
getReverseStyle = () => {
|
|
80
93
|
return Constants.isRTL && this.state.forceLTR && styles.ltr;
|
|
81
|
-
}
|
|
94
|
+
};
|
|
82
95
|
|
|
83
96
|
renderDefaultSliderExample() {
|
|
84
97
|
const {sliderValue, forceLTR} = this.state;
|
|
@@ -88,7 +101,7 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
88
101
|
<Text $textDefault text70BO>
|
|
89
102
|
Default slider
|
|
90
103
|
</Text>
|
|
91
|
-
|
|
104
|
+
|
|
92
105
|
<View row centerV style={this.getReverseStyle()}>
|
|
93
106
|
<Icon assetName={'search'} style={styles.image}/>
|
|
94
107
|
<Slider
|
|
@@ -99,6 +112,7 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
99
112
|
step={1}
|
|
100
113
|
containerStyle={styles.sliderContainer}
|
|
101
114
|
disableRTL={forceLTR}
|
|
115
|
+
// @ts-expect-error
|
|
102
116
|
ref={this.slider}
|
|
103
117
|
onReset={this.onSliderReset}
|
|
104
118
|
/>
|
|
@@ -188,6 +202,7 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
188
202
|
maximumValue={100}
|
|
189
203
|
step={1}
|
|
190
204
|
disableRTL={forceLTR}
|
|
205
|
+
// @ts-expect-error
|
|
191
206
|
ref={this.rangeSlider}
|
|
192
207
|
onReset={this.onRangeSliderReset}
|
|
193
208
|
/>
|
|
@@ -243,6 +258,7 @@ export default class SliderScreen extends Component<SliderScreenProps, SliderScr
|
|
|
243
258
|
color={color}
|
|
244
259
|
containerStyle={styles.gradientSliderContainer}
|
|
245
260
|
onValueChange={this.onGradientValueChange}
|
|
261
|
+
// @ts-expect-error
|
|
246
262
|
ref={this.gradientSlider}
|
|
247
263
|
/>
|
|
248
264
|
<View style={styles.box}>
|
|
@@ -39,14 +39,13 @@ class TabControllerScreen extends Component<{}, State> {
|
|
|
39
39
|
initialIndex: 0,
|
|
40
40
|
selectedIndex: 0,
|
|
41
41
|
key: Date.now(),
|
|
42
|
-
items:
|
|
42
|
+
items: this.generateTabItems(false)
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
this.state.items = this.generateTabItems();
|
|
46
44
|
}
|
|
47
45
|
tabController = React.createRef<TabControllerImperativeMethods>();
|
|
48
46
|
|
|
49
47
|
generateTabItems = (fewItems = this.state.fewItems): TabControllerItemProps[] => {
|
|
48
|
+
// @ts-expect-error
|
|
50
49
|
const items: TabControllerItemProps[] = _.flow(tabs => _.take(tabs, fewItems ? 3 : TABS.length),
|
|
51
50
|
(tabs: TabControllerItemProps[]) =>
|
|
52
51
|
_.map<TabControllerItemProps>(tabs, (tab: TabControllerItemProps, index: number) => ({
|
|
@@ -58,7 +57,7 @@ class TabControllerScreen extends Component<{}, State> {
|
|
|
58
57
|
trailingAccessory: index === 4 ? <Text marginL-4>{Assets.emojis.camera}</Text> : undefined
|
|
59
58
|
})))(TABS);
|
|
60
59
|
|
|
61
|
-
const addItem: TabControllerItemProps = {
|
|
60
|
+
const addItem: TabControllerItemProps & {key: string} = {
|
|
62
61
|
icon: Assets.icons.demo.add,
|
|
63
62
|
key: 'add',
|
|
64
63
|
ignore: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import React, {Component} from 'react';
|
|
3
3
|
import {StyleSheet, ScrollView, ActivityIndicator} from 'react-native';
|
|
4
|
-
import {Assets, Colors, Spacings,
|
|
4
|
+
import {Assets, Colors, Spacings, View, Text, Button, Keyboard, TextField, TextFieldRef} from 'react-native-ui-lib';
|
|
5
5
|
const {KeyboardAwareInsetsView} = Keyboard;
|
|
6
6
|
|
|
7
7
|
const priceFormatter = Intl.NumberFormat('en-US');
|
|
@@ -32,8 +32,8 @@ export default () => {
|
|
|
32
32
|
},
|
|
33
33
|
[yearsValue]);
|
|
34
34
|
|
|
35
|
-
const onChange = useCallback((value) => {
|
|
36
|
-
setYearsValue(value);
|
|
35
|
+
const onChange = useCallback((value: number | string) => {
|
|
36
|
+
setYearsValue(value as number);
|
|
37
37
|
}, []);
|
|
38
38
|
|
|
39
39
|
const onPickDaysPress = useCallback(() => {
|
|
@@ -83,7 +83,7 @@ export default class WizardScreen extends Component<{}, State> {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
const activeIndex = prevActiveIndex + 1;
|
|
86
|
-
let completedStepIndex = prevCompletedStepIndex;
|
|
86
|
+
let completedStepIndex: number | undefined = prevCompletedStepIndex;
|
|
87
87
|
if (!prevCompletedStepIndex || prevCompletedStepIndex < prevActiveIndex) {
|
|
88
88
|
completedStepIndex = prevActiveIndex;
|
|
89
89
|
}
|
|
@@ -150,10 +150,11 @@ export default class WizardScreen extends Component<{}, State> {
|
|
|
150
150
|
value={customerName}
|
|
151
151
|
validate={'required'}
|
|
152
152
|
validateOnChange
|
|
153
|
-
|
|
153
|
+
validationMessage="This is required"
|
|
154
154
|
onChangeText={this.onNameEntered}
|
|
155
155
|
/>
|
|
156
156
|
{this.renderPrevButton()}
|
|
157
|
+
{/* @ts-expect-error */}
|
|
157
158
|
{this.renderNextButton(_.isNil(customerName) || customerName.trim().length === 0)}
|
|
158
159
|
</View>
|
|
159
160
|
);
|
|
@@ -186,7 +187,7 @@ export default class WizardScreen extends Component<{}, State> {
|
|
|
186
187
|
getStepState(index: number) {
|
|
187
188
|
const {activeIndex, completedStepIndex} = this.state;
|
|
188
189
|
let state = Wizard.States.DISABLED;
|
|
189
|
-
if (completedStepIndex > index - 1) {
|
|
190
|
+
if (completedStepIndex && completedStepIndex > index - 1) {
|
|
190
191
|
state = Wizard.States.COMPLETED;
|
|
191
192
|
} else if (activeIndex === index || completedStepIndex === index - 1) {
|
|
192
193
|
state = Wizard.States.ENABLED;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {StyleSheet, ScrollView} from 'react-native';
|
|
3
|
-
import {Colors, View, Text, Incubator, TouchableOpacity} from 'react-native-ui-lib';
|
|
3
|
+
import {Colors, View, Text, Incubator, TouchableOpacity, ExpandableOverlayMethods, PickerMethods} from 'react-native-ui-lib';
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
|
|
6
6
|
const COLOR_OPTIONS: {[key: string]: string} = {
|
|
@@ -11,8 +11,8 @@ const COLOR_OPTIONS: {[key: string]: string} = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export default class TextFieldScreen extends Component {
|
|
14
|
-
expandableInputRef = React.createRef();
|
|
15
|
-
expandablePickerRef = React.createRef();
|
|
14
|
+
expandableInputRef = React.createRef<ExpandableOverlayMethods>();
|
|
15
|
+
expandablePickerRef = React.createRef<PickerMethods>();
|
|
16
16
|
|
|
17
17
|
state = {
|
|
18
18
|
textFieldValueDraft: '',
|
|
@@ -24,16 +24,16 @@ export default class TextFieldScreen extends Component {
|
|
|
24
24
|
|
|
25
25
|
onDone = () => {
|
|
26
26
|
this.setState({textFieldValue: this.state.textFieldValueDraft});
|
|
27
|
-
this.expandableInputRef.current
|
|
27
|
+
this.expandableInputRef.current?.closeExpandable();
|
|
28
28
|
};
|
|
29
29
|
onCancel = () => {
|
|
30
30
|
this.setState({textFieldValueDraft: this.state.textFieldValue});
|
|
31
|
-
this.expandableInputRef.current
|
|
31
|
+
this.expandableInputRef.current?.closeExpandable();
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
onPickItem = ({customValue: color}: {customValue: string}) => {
|
|
35
35
|
this.setState({selectedColor: color});
|
|
36
|
-
this.expandablePickerRef.current
|
|
36
|
+
this.expandablePickerRef.current?.closeExpandable();
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
renderInputModal = () => {
|
|
@@ -79,6 +79,7 @@ const IncubatorSliderScreen = () => {
|
|
|
79
79
|
</Text>
|
|
80
80
|
{renderValuesBox(sliderValue)}
|
|
81
81
|
<Incubator.Slider
|
|
82
|
+
// @ts-expect-error TODO: need to properly support SliderMethods type to use for ref
|
|
82
83
|
ref={slider}
|
|
83
84
|
onValueChange={onValueChange}
|
|
84
85
|
containerStyle={styles.container}
|
|
@@ -97,6 +98,7 @@ const IncubatorSliderScreen = () => {
|
|
|
97
98
|
<Text margin-10 text70BL $textDefault>
|
|
98
99
|
Disabled Slider
|
|
99
100
|
</Text>
|
|
101
|
+
{/* @ts-expect-error */}
|
|
100
102
|
<Incubator.Slider value={0.4} containerStyle={styles.container} disableRTL={disableRTL} disabled/>
|
|
101
103
|
</View>
|
|
102
104
|
);
|
|
@@ -110,6 +112,7 @@ const IncubatorSliderScreen = () => {
|
|
|
110
112
|
</Text>
|
|
111
113
|
{renderValuesBox(customSliderValue)}
|
|
112
114
|
<Incubator.Slider
|
|
115
|
+
// @ts-expect-error
|
|
113
116
|
ref={customSlider}
|
|
114
117
|
onValueChange={onCustomValueChange}
|
|
115
118
|
value={20}
|
|
@@ -137,6 +140,7 @@ const IncubatorSliderScreen = () => {
|
|
|
137
140
|
</Text>
|
|
138
141
|
{renderValuesBox(negativeSliderValue)}
|
|
139
142
|
<Incubator.Slider
|
|
143
|
+
// @ts-expect-error
|
|
140
144
|
ref={negativeSlider}
|
|
141
145
|
onValueChange={onNegativeValueChange}
|
|
142
146
|
value={-30}
|
|
@@ -159,6 +163,7 @@ const IncubatorSliderScreen = () => {
|
|
|
159
163
|
<View marginH-20>
|
|
160
164
|
{renderValuesBox(sliderMinValue, sliderMaxValue)}
|
|
161
165
|
<Incubator.Slider
|
|
166
|
+
// @ts-expect-error
|
|
162
167
|
ref={rangeSlider}
|
|
163
168
|
useRange
|
|
164
169
|
onRangeChange={onRangeChange}
|
|
@@ -6,6 +6,7 @@ import {renderMultipleSegmentOptions, renderBooleanOption, renderRadioGroup} fro
|
|
|
6
6
|
const {Toast} = Incubator;
|
|
7
7
|
|
|
8
8
|
const TOAST_ACTIONS = {
|
|
9
|
+
none: {},
|
|
9
10
|
label: {label: 'Undo', onPress: () => console.warn('undo')},
|
|
10
11
|
icon: {iconSource: Assets.icons.demo.plus, onPress: () => console.warn('add')}
|
|
11
12
|
};
|
|
@@ -24,9 +25,9 @@ export default class ToastsScreen extends Component {
|
|
|
24
25
|
toastPosition: 'bottom' as Incubator.ToastProps['position'],
|
|
25
26
|
isCustomContent: false,
|
|
26
27
|
showLoader: false,
|
|
27
|
-
selectedAction: '',
|
|
28
|
+
selectedAction: 'none' as keyof typeof TOAST_ACTIONS,
|
|
28
29
|
hasAttachment: false,
|
|
29
|
-
selectedPreset: '' as Incubator.ToastProps['preset'],
|
|
30
|
+
selectedPreset: '' as Incubator.ToastProps['preset'] & '',
|
|
30
31
|
isSwipeable: true
|
|
31
32
|
};
|
|
32
33
|
|
|
@@ -21,11 +21,18 @@ const IMAGES = [
|
|
|
21
21
|
'https://images.pexels.com/photos/3206153/pexels-photo-3206153.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'
|
|
22
22
|
];
|
|
23
23
|
|
|
24
|
+
// @ts-expect-error
|
|
24
25
|
const GUTTER_SIZE = Spacings.page;
|
|
26
|
+
// @ts-expect-error
|
|
25
27
|
const COLUMN_SIZE = (Constants.screenWidth - 2 * Spacings.page - GUTTER_SIZE) / 2;
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
type ImageObject = {uri: string; width: number; height: number; aspectRatio: number};
|
|
30
|
+
interface State {
|
|
31
|
+
images?: ImageObject[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class Pinterest extends Component<{}, State> {
|
|
35
|
+
constructor(props: any) {
|
|
29
36
|
super(props);
|
|
30
37
|
|
|
31
38
|
this.state = {};
|
|
@@ -46,11 +53,11 @@ class Pinterest extends Component {
|
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
loadImages() {
|
|
49
|
-
const images =
|
|
56
|
+
const images: ImageObject[] = [];
|
|
50
57
|
|
|
51
58
|
_.map(IMAGES, (image, index) => {
|
|
52
59
|
Image.getSize(image,
|
|
53
|
-
(width, height) => {
|
|
60
|
+
(width: number, height: number) => {
|
|
54
61
|
images[index] = {
|
|
55
62
|
uri: image,
|
|
56
63
|
width,
|
|
@@ -73,7 +80,8 @@ class Pinterest extends Component {
|
|
|
73
80
|
});
|
|
74
81
|
}
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
|
|
84
|
+
renderImage(image: ImageObject) {
|
|
77
85
|
return (
|
|
78
86
|
<Card
|
|
79
87
|
key={image.uri}
|
|
@@ -98,7 +106,7 @@ class Pinterest extends Component {
|
|
|
98
106
|
);
|
|
99
107
|
}
|
|
100
108
|
|
|
101
|
-
renderColumn(columnIndex) {
|
|
109
|
+
renderColumn(columnIndex: number) {
|
|
102
110
|
const {images} = this.state;
|
|
103
111
|
return (
|
|
104
112
|
<View marginR-page={columnIndex === 0}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {ScrollView} from 'react-native';
|
|
3
|
-
import {Assets, View, Text, Icon, Colors, Image, Button, Carousel, Picker} from 'react-native-ui-lib';
|
|
3
|
+
import {Assets, View, Text, Icon, Colors, Image, Button, Carousel, Picker, PickerValue} from 'react-native-ui-lib';
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
|
|
6
6
|
const colorOptions: {[key: string]: {name: string; color: string}} = {
|
|
@@ -76,19 +76,27 @@ class Product extends Component {
|
|
|
76
76
|
<Picker
|
|
77
77
|
migrate
|
|
78
78
|
value={selectedColor}
|
|
79
|
-
onChange={(value:
|
|
80
|
-
trailingAccessory={
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
onChange={(value: PickerValue) => this.setState({selectedColor: value})}
|
|
80
|
+
trailingAccessory={
|
|
81
|
+
<Icon
|
|
82
|
+
{...{
|
|
83
|
+
width: 24,
|
|
84
|
+
height: 24,
|
|
85
|
+
backgroundColor: colorOptions[selectedColor].color,
|
|
86
|
+
borderRadius: 12
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
}
|
|
86
90
|
>
|
|
87
91
|
{_.map(colorOptions, (colorOption, colorKey) => {
|
|
88
92
|
return <Picker.Item key={colorKey} value={colorKey} label={colorOption.name}/>;
|
|
89
93
|
})}
|
|
90
94
|
</Picker>
|
|
91
|
-
<Picker
|
|
95
|
+
<Picker
|
|
96
|
+
migrate
|
|
97
|
+
value={selectedSize}
|
|
98
|
+
onChange={(value: PickerValue) => this.setState({selectedSize: value})}
|
|
99
|
+
>
|
|
92
100
|
{_.map(sizeOptions, (sizeOption, sizeKey) => {
|
|
93
101
|
return <Picker.Item key={sizeKey} value={sizeKey} label={sizeOption.name}/>;
|
|
94
102
|
})}
|
|
@@ -90,7 +90,7 @@ class Twitter extends Component {
|
|
|
90
90
|
) : null}
|
|
91
91
|
<View row style={{justifyContent: 'space-between', marginVertical: 10}}>
|
|
92
92
|
{post.icons
|
|
93
|
-
? post.icons.map((icnSource: any, index) => {
|
|
93
|
+
? post.icons.map((icnSource: any, index: number) => {
|
|
94
94
|
return (
|
|
95
95
|
<Button
|
|
96
96
|
key={index}
|