unicorn-demo-app 6.13.3 → 6.14.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unicorn-demo-app",
3
- "version": "6.13.3",
3
+ "version": "6.14.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@ interface RadioGroupOptions {
22
22
  useValueAsLabel?: boolean;
23
23
  }
24
24
 
25
- export function renderHeader(title: string, others: TextProps) {
25
+ export function renderHeader(title: string, others?: TextProps) {
26
26
  return (
27
27
  <Text text30 $textDefault {...others}>
28
28
  {title}
@@ -8,17 +8,17 @@ import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
8
8
  import {
9
9
  Assets,
10
10
  Colors,
11
+ Spacings,
11
12
  View,
12
13
  Text,
14
+ TextField,
13
15
  TouchableOpacity,
14
16
  Icon,
15
17
  Button,
16
- TabController,
17
- Incubator
18
+ TabController
18
19
  } from 'react-native-ui-lib'; //eslint-disable-line
19
20
  import {navigationData} from './MenuStructure';
20
21
 
21
- const {TextField} = Incubator;
22
22
  const settingsIcon = require('../assets/icons/settings.png');
23
23
  const chevronIcon = require('../assets/icons/chevronRight.png');
24
24
 
@@ -56,8 +56,6 @@ class MainScreen extends Component {
56
56
  filteredNavigationData: data
57
57
  };
58
58
 
59
- this.filterExplorerScreens = _.throttle(this.filterExplorerScreens, 300);
60
-
61
59
  Navigation.events().bindComponent(this);
62
60
  }
63
61
 
@@ -119,11 +117,11 @@ class MainScreen extends Component {
119
117
  }, 0);
120
118
  };
121
119
 
122
- updateSearch = filterText => {
120
+ updateSearch = _.throttle(filterText => {
123
121
  this.setState({filterText}, () => {
124
122
  this.filterExplorerScreens();
125
123
  });
126
- };
124
+ }, 800);
127
125
 
128
126
  clearSearch = () => {
129
127
  this.updateSearch('');
@@ -164,8 +162,8 @@ class MainScreen extends Component {
164
162
  return (
165
163
  <TextField
166
164
  migrate
165
+ preset={null}
167
166
  ref={r => (this.input = r)}
168
- value={filterText}
169
167
  testID="uilib.search_for_component"
170
168
  placeholder="Search for your component..."
171
169
  onChangeText={this.updateSearch}
@@ -178,9 +176,9 @@ class MainScreen extends Component {
178
176
  text70
179
177
  trailingAccessory={
180
178
  filterText ? (
181
- <Button link iconSource={Assets.icons.demo.close} grey10 onPress={this.clearSearch}/>
179
+ <Button link iconSource={Assets.icons.demo.close} $iconDefault onPress={this.clearSearch}/>
182
180
  ) : (
183
- <Icon source={Assets.icons.demo.search}/>
181
+ <Icon tintColor={Colors.$iconDefault} source={Assets.icons.demo.search}/>
184
182
  )
185
183
  }
186
184
  />
@@ -204,7 +202,7 @@ class MainScreen extends Component {
204
202
  paddingV-s2
205
203
  onPress={() => this.openScreen(item)}
206
204
  onLongPress={() => this.setDefaultScreen(item)}
207
- activeBackgroundColor={Colors.primary}
205
+ activeBackgroundColor={Colors.$backgroundPrimaryHeavy}
208
206
  activeOpacity={1}
209
207
  >
210
208
  <Text style={[item.deprecate && styles.entryTextDeprecated]} grey10 text50>
@@ -230,7 +228,7 @@ class MainScreen extends Component {
230
228
  keyboardShouldPersistTaps="always"
231
229
  data={flatData}
232
230
  contentContainerStyle={{paddingTop: 20}}
233
- keyExtractor={(item, index) => index.toString()}
231
+ keyExtractor={(_item, index) => index.toString()}
234
232
  renderItem={this.renderItem}
235
233
  />
236
234
  );
@@ -299,12 +297,13 @@ const styles = StyleSheet.create({
299
297
  textDecorationLine: 'line-through'
300
298
  },
301
299
  searchContainer: {
302
- padding: 16,
303
- paddingBottom: 0
300
+ padding: Spacings.s4,
301
+ paddingBottom: 0,
302
+ marginBottom: Spacings.s2
304
303
  },
305
304
  searchField: {
306
- padding: 12,
307
- backgroundColor: Colors.grey80,
305
+ padding: Spacings.s3,
306
+ backgroundColor: Colors.$backgroundNeutralLight,
308
307
  borderRadius: 8
309
308
  }
310
309
  });
@@ -19,12 +19,12 @@ export default class ActionBarScreen extends Component {
19
19
 
20
20
  render() {
21
21
  return (
22
- <View flex bg-grey80>
22
+ <View flex bg-$backgroundNeutralLight>
23
23
  <PageControl
24
24
  containerStyle={[styles.pageControl, styles.absoluteContainer]}
25
25
  numOfPages={6}
26
26
  currentPage={this.state.currentPage}
27
- color={Colors.grey10}
27
+ color={Colors.$backgroundInverted}
28
28
  size={15}
29
29
  />
30
30
  <Carousel
@@ -35,7 +35,7 @@ export default class ActionBarScreen extends Component {
35
35
  <View style={styles.page}>
36
36
  <ActionBar
37
37
  actions={[
38
- {label: 'Delete', onPress: () => Alert.alert('delete'), red30: true},
38
+ {label: 'Delete', onPress: () => Alert.alert('delete'), $textDangerLight: true},
39
39
  {label: 'Replace Photo', onPress: () => Alert.alert('replace photo')},
40
40
  {label: 'Edit', onPress: () => Alert.alert('edit')}
41
41
  ]}
@@ -44,17 +44,17 @@ export default class ActionBarScreen extends Component {
44
44
 
45
45
  <View style={styles.page}>
46
46
  <ActionBar
47
- backgroundColor={Colors.primary}
47
+ backgroundColor={Colors.$backgroundPrimaryHeavy}
48
48
  actions={[
49
- {label: 'Hide', onPress: () => Alert.alert('hide'), white: true},
50
- {label: 'Add Discount', onPress: () => Alert.alert('add discount'), white: true},
51
- {label: 'Duplicate', onPress: () => Alert.alert('duplicate'), white: true}
49
+ {label: 'Hide', onPress: () => Alert.alert('hide'), $textDefaultLight: true},
50
+ {label: 'Add Discount', onPress: () => Alert.alert('add discount'), $textDefaultLight: true},
51
+ {label: 'Duplicate', onPress: () => Alert.alert('duplicate'), $textDefaultLight: true}
52
52
  ]}
53
53
  />
54
54
  </View>
55
55
 
56
56
  <View style={styles.page}>
57
- <ActionBar actions={[{label: 'Delete', red30: true}, {label: 'Edit'}]}/>
57
+ <ActionBar actions={[{label: 'Delete', $textDangerLight: true}, {label: 'Edit'}]}/>
58
58
  </View>
59
59
 
60
60
  <View style={styles.page}>
@@ -65,9 +65,9 @@ export default class ActionBarScreen extends Component {
65
65
  <ActionBar
66
66
  centered
67
67
  actions={[
68
- {label: 'Bold', labelStyle: {color: Colors.grey10, ...Typography.text60, fontWeight: '400'}},
69
- {label: 'Italic', text60: true, labelStyle: {fontStyle: 'italic', color: Colors.grey10}},
70
- {label: 'Link', text60: true, labelStyle: {textDecorationLine: 'underline', color: Colors.grey10}}
68
+ {label: 'Bold', labelStyle: {color: Colors.$textDefault, ...Typography.text60, fontWeight: '400'}},
69
+ {label: 'Italic', text60: true, labelStyle: {fontStyle: 'italic', color: Colors.$textDefault}},
70
+ {label: 'Link', text60: true, labelStyle: {textDecorationLine: 'underline', color: Colors.$textDefault}}
71
71
  ]}
72
72
  />
73
73
  </View>
@@ -65,7 +65,7 @@ const examples = [
65
65
  icon: star,
66
66
  size: 14,
67
67
  borderWidth: 1.5,
68
- borderColor: Colors.$outlineLight,
68
+ borderColor: Colors.$outlineInverted,
69
69
  iconStyle: {backgroundColor: Colors.$backgroundWarningHeavy}
70
70
  }
71
71
  },
@@ -107,7 +107,7 @@ const examples = [
107
107
  label: '+2',
108
108
  size: 24,
109
109
  borderWidth: 1.5,
110
- borderColor: Colors.$outlineLight
110
+ borderColor: Colors.$outlineInverted
111
111
  }
112
112
  }
113
113
  ];
@@ -97,7 +97,6 @@ export default class CardsScreen extends Component<CardsScreenProps, CardsScreen
97
97
  style={{marginBottom: 15}}
98
98
  onPress={() => {}}
99
99
  borderRadius={borderRadius}
100
- useNative
101
100
  bg-$backgroundElevated
102
101
  activeOpacity={1}
103
102
  activeScale={isImageOnLeft ? 0.96 : 1.04}
@@ -136,7 +135,7 @@ export default class CardsScreen extends Component<CardsScreenProps, CardsScreen
136
135
 
137
136
  renderCoupon = (cardProps: CardProps) => {
138
137
  return (
139
- <Card {...cardProps} flex height={160} onPress={() => {}} useNative activeOpacity={1} activeScale={0.96}>
138
+ <Card {...cardProps} flex height={160} onPress={() => {}} activeOpacity={1} activeScale={0.96}>
140
139
  <Card.Section
141
140
  bg-$backgroundDangerHeavy
142
141
  padding-20
@@ -169,7 +168,7 @@ export default class CardsScreen extends Component<CardsScreenProps, CardsScreen
169
168
 
170
169
  renderComplexImage = (cardProps: CardProps, image: React.ReactNode) => {
171
170
  return (
172
- <Card {...cardProps} flex marginV-10 onPress={() => {}} useNative activeOpacity={1} activeScale={0.96}>
171
+ <Card {...cardProps} flex marginV-10 onPress={() => {}} activeOpacity={1} activeScale={0.96}>
173
172
  {image}
174
173
  <Card.Section
175
174
  bg-$backgroundElevated
@@ -87,7 +87,7 @@ class CarouselScreen extends Component<Props, State> {
87
87
 
88
88
  return (
89
89
  <ScrollView showsVerticalScrollIndicator={false}>
90
- <Text h1 margin-20>
90
+ <Text h1 margin-20 $textDefault>
91
91
  Carousel
92
92
  </Text>
93
93
 
@@ -115,7 +115,6 @@ class CarouselScreen extends Component<Props, State> {
115
115
  containerStyle={{height: 160}}
116
116
  pageControlPosition={Carousel.pageControlPositions.UNDER}
117
117
  pageControlProps={{onPagePress: this.onPagePress, limitShownPages}}
118
- // showCounter
119
118
  allowAccessibleLayout
120
119
  >
121
120
  {_.map([...Array(numberOfPagesShown)], (item, index) => (
@@ -143,6 +142,7 @@ class CarouselScreen extends Component<Props, State> {
143
142
  containerStyle: styles.loopCarousel
144
143
  }}
145
144
  pageControlPosition={Carousel.pageControlPositions.OVER}
145
+ showCounter
146
146
  >
147
147
  {IMAGES.map((image, i) => {
148
148
  return (
@@ -18,7 +18,7 @@ class FaderScreen extends Component<WithScrollReachedProps> {
18
18
  renderItem = (index: number) => {
19
19
  return (
20
20
  <View key={index} style={styles.item}>
21
- <Text>{index + 1}</Text>
21
+ <Text $textDefault>{index + 1}</Text>
22
22
  </View>
23
23
  );
24
24
  };
@@ -31,7 +31,7 @@ class FaderScreen extends Component<WithScrollReachedProps> {
31
31
  : !scrollReachedProps.isScrollAtStart;
32
32
 
33
33
  return (
34
- <View margin-10>
34
+ <View padding-10>
35
35
  {renderHeader('Fader', {'marginB-10': true})}
36
36
  <View center>
37
37
  <View style={styles.container}>
@@ -69,8 +69,8 @@ const styles = StyleSheet.create({
69
69
  item: {
70
70
  height: itemHeight,
71
71
  width: itemWidth,
72
- backgroundColor: Colors.grey60,
73
- borderColor: Colors.grey40,
72
+ backgroundColor: Colors.$backgroundDefault,
73
+ borderColor: Colors.$outlineDisabled,
74
74
  borderWidth: 2,
75
75
  alignItems: 'center',
76
76
  justifyContent: 'center'
@@ -13,7 +13,9 @@ import {
13
13
  PanningProvider,
14
14
  Typography,
15
15
  PickerProps,
16
- DialogProps
16
+ PickerMethods,
17
+ DialogProps,
18
+ Button
17
19
  } from 'react-native-ui-lib'; //eslint-disable-line
18
20
  import contactsData from '../../data/conversations';
19
21
  import {longOptions} from './PickerScreenLongOptions';
@@ -38,6 +40,7 @@ const filters = [
38
40
  ];
39
41
 
40
42
  export default class PickerScreen extends Component {
43
+ picker = React.createRef<PickerMethods>();
41
44
  state = {
42
45
  itemsCount: 1,
43
46
  // language: {value: 'java', label: 'Java'},
@@ -260,6 +263,8 @@ export default class PickerScreen extends Component {
260
263
 
261
264
  <Picker
262
265
  migrate
266
+ // @ts-expect-error
267
+ ref={this.picker}
263
268
  migrateTextField
264
269
  label="Language"
265
270
  placeholder="Favorite Language"
@@ -270,6 +275,7 @@ export default class PickerScreen extends Component {
270
275
  searchPlaceholder={'Search a language'}
271
276
  searchStyle={{color: Colors.blue30, placeholderTextColor: Colors.grey50}}
272
277
  marginT-s4
278
+ enableErrors={false}
273
279
  // mode={Picker.modes.MULTI}
274
280
  // useNativePicker
275
281
  >
@@ -277,6 +283,12 @@ export default class PickerScreen extends Component {
277
283
  <Picker.Item key={option.value} value={option.value} label={option.label} disabled={option.disabled}/>
278
284
  ))}
279
285
  </Picker>
286
+ <Button
287
+ label="Open Picker Manually"
288
+ link
289
+ style={{alignSelf: 'flex-start'}}
290
+ onPress={() => this.picker.current?.openExpandable?.()}
291
+ />
280
292
  </View>
281
293
  </ScrollView>
282
294
  );
@@ -41,14 +41,14 @@ export default class ProgressBarScreen extends Component {
41
41
 
42
42
  return (
43
43
  <ScrollView>
44
- <View flex bg-grey80 spread paddingV-18>
44
+ <View flex bg-$backgroundNeutralLight spread paddingV-18>
45
45
  <View paddingL-18 marginB-18>
46
- <Text text40 grey10>
46
+ <Text $textDefault text40>
47
47
  ProgressBar
48
48
  </Text>
49
49
  </View>
50
50
 
51
- <Text text70 style={styles.text}>
51
+ <Text $textDefault text70 style={styles.text}>
52
52
  Default
53
53
  </Text>
54
54
  <ProgressBar
@@ -56,7 +56,7 @@ export default class ProgressBarScreen extends Component {
56
56
  style={styles.progressBar}
57
57
  />
58
58
 
59
- <Text text70 style={styles.text}>
59
+ <Text $textDefault text70 style={styles.text}>
60
60
  FullWidth
61
61
  </Text>
62
62
  <ProgressBar
@@ -65,7 +65,7 @@ export default class ProgressBarScreen extends Component {
65
65
  fullWidth
66
66
  />
67
67
 
68
- <Text text70 style={styles.text}>
68
+ <Text $textDefault text70 style={styles.text}>
69
69
  Styled
70
70
  </Text>
71
71
  <ProgressBar
@@ -74,7 +74,7 @@ export default class ProgressBarScreen extends Component {
74
74
  progressColor={Colors.purple70}
75
75
  />
76
76
 
77
- <Text text70 style={styles.text}>
77
+ <Text $textDefault text70 style={styles.text}>
78
78
  Custom Element
79
79
  </Text>
80
80
  <ProgressBar
@@ -1,5 +1,5 @@
1
1
  import React, {Component} from 'react';
2
- import {TouchableOpacity, ScrollView} from 'react-native';
2
+ import {TouchableOpacity, ScrollView, StyleSheet} from 'react-native';
3
3
  import {Assets, Colors, View, Text, RadioButton, RadioGroup} from 'react-native-ui-lib'; //eslint-disable-line
4
4
  const starIcon = require('../../assets/icons/star.png');
5
5
 
@@ -11,10 +11,10 @@ const COLORS = {
11
11
 
12
12
  export default class RadioButtonScreen extends Component {
13
13
  static colors = COLORS;
14
-
14
+
15
15
  constructor(props) {
16
16
  super(props);
17
-
17
+
18
18
  this.state = {
19
19
  color: undefined,
20
20
  messageType: undefined,
@@ -89,10 +89,10 @@ export default class RadioButtonScreen extends Component {
89
89
  <Text marginB-20 text60 $textDefault>
90
90
  Alignments
91
91
  </Text>
92
- {this.renderRadioButtonWithImageAndText('right-icon', 'Text on right')}
93
- {this.renderRadioButtonWithImageAndText('left-icon', 'Text on left', true)}
94
- {this.renderRadioButton('left-content', 'Content on left', true)}
95
- {this.renderRadioButton('right-content', 'Content on right', {contentOnRight: true})}
92
+ {this.renderRadioButtonWithImageAndText('left-icon', 'Text on right')}
93
+ {this.renderRadioButtonWithImageAndText('right-icon', 'Text on left', true)}
94
+ {this.renderRadioButton('right-content', 'Content on right', true)}
95
+ {this.renderRadioButton('left-content', 'Content on left', {contentOnLeft: true})}
96
96
  <Text marginT-10>You chose: {this.state.textSide}</Text>
97
97
  </RadioGroup>
98
98
 
@@ -116,6 +116,8 @@ export default class RadioButtonScreen extends Component {
116
116
  onPress={() => this.setState({individualValue2: !this.state.individualValue2})}
117
117
  label="Individual Radio Button (with style)"
118
118
  labelStyle={{fontSize: 16, fontWeight: 'bold'}}
119
+ contentOnLeft
120
+ containerStyle={styles.contentOnLeft}
119
121
  />
120
122
  </View>
121
123
  <TouchableOpacity
@@ -124,7 +126,12 @@ export default class RadioButtonScreen extends Component {
124
126
  accessible={false}
125
127
  >
126
128
  <View row centerV>
127
- <RadioButton selected={this.state.individualValue} label="Individual Radio Button (wrapped)"/>
129
+ <RadioButton
130
+ contentOnLeft
131
+ containerStyle={styles.contentOnLeft}
132
+ selected={this.state.individualValue}
133
+ label="Individual Radio Button (wrapped)"
134
+ />
128
135
  </View>
129
136
  </TouchableOpacity>
130
137
  <View row centerV marginT-10>
@@ -133,6 +140,8 @@ export default class RadioButtonScreen extends Component {
133
140
  selected={this.state.disabledValue}
134
141
  onPress={() => this.setState({disabledValue: !this.state.disabledValue})}
135
142
  label="Disabled Radio Button"
143
+ contentOnLeft
144
+ containerStyle={styles.contentOnLeft}
136
145
  />
137
146
  </View>
138
147
  <View row centerV marginT-10>
@@ -141,6 +150,8 @@ export default class RadioButtonScreen extends Component {
141
150
  selected={this.state.disabledSelectedValue}
142
151
  onPress={() => this.setState({disabledSelectedValue: !this.state.disabledSelectedValue})}
143
152
  label="Disabled Selected Radio Button"
153
+ contentOnLeft
154
+ containerStyle={styles.contentOnLeft}
144
155
  />
145
156
  </View>
146
157
  </ScrollView>
@@ -148,3 +159,10 @@ export default class RadioButtonScreen extends Component {
148
159
  );
149
160
  }
150
161
  }
162
+
163
+ const styles = StyleSheet.create({
164
+ contentOnLeft: {
165
+ flex: 1,
166
+ justifyContent: 'space-between'
167
+ }
168
+ });
@@ -38,17 +38,17 @@ const SegmentedControlScreen = () => {
38
38
  />
39
39
  <SegmentedControl
40
40
  containerStyle={styles.container}
41
- activeColor={Colors.red30}
41
+ activeColor={Colors.$textDangerLight}
42
42
  segments={segments.third}
43
43
  />
44
44
  <SegmentedControl
45
45
  containerStyle={styles.container}
46
46
  segments={segments.forth}
47
- activeColor={Colors.grey10}
47
+ activeColor={Colors.$textDefault}
48
48
  borderRadius={BorderRadiuses.br20}
49
- backgroundColor={Colors.grey10}
50
- activeBackgroundColor={Colors.grey40}
51
- inactiveColor={Colors.grey70}
49
+ backgroundColor={Colors.$backgroundInverted}
50
+ activeBackgroundColor={Colors.$backgroundNeutralIdle}
51
+ inactiveColor={Colors.$textDisabled}
52
52
  />
53
53
  </View>
54
54
  <SegmentedControl
@@ -60,7 +60,7 @@ const SegmentedControlScreen = () => {
60
60
  segments={segments.sixth}
61
61
  />
62
62
  </View>
63
- <Text text40 grey10>
63
+ <Text text40 $textDefault>
64
64
  Segmented Control
65
65
  </Text>
66
66
  </View>
@@ -14,7 +14,6 @@ import {
14
14
  View,
15
15
  Colors
16
16
  } from 'react-native-ui-lib';
17
- // @ts-expect-error
18
17
  import * as ExampleScreenPresenter from '../ExampleScreenPresenter';
19
18
 
20
19
  const AVATAR_SIZE = 48;
@@ -29,9 +28,10 @@ const NUMBER_OF_ITEMS_TO_SHOW = 10;
29
28
 
30
29
  const DATA_TYPE = {
31
30
  List: 'list',
31
+ Content: 'content',
32
32
  Images: 'images',
33
33
  Avatars: 'avatars',
34
- Content: 'content'
34
+ Custom: 'custom'
35
35
  };
36
36
 
37
37
  const LIST_TYPE = {
@@ -152,7 +152,7 @@ export default class SkeletonViewScreen extends Component {
152
152
  <Text>Verified</Text>
153
153
  </View>
154
154
  );
155
- }
155
+ };
156
156
 
157
157
  renderListItemsData = (customValue?: any) => {
158
158
  const {isLarge, showEndContent} = this.state;
@@ -162,13 +162,7 @@ export default class SkeletonViewScreen extends Component {
162
162
  <React.Fragment>
163
163
  {_.times(NUMBER_OF_ITEMS_TO_SHOW, index => {
164
164
  return (
165
- <ListItem
166
- key={index}
167
- activeBackgroundColor={Colors.grey60}
168
- activeOpacity={0.3}
169
- height={90}
170
- onPress={() => Alert.alert(`pressed on order #${index + 1}`)}
171
- >
165
+ <ListItem key={index} height={90} onPress={() => Alert.alert(`pressed on order #${index + 1}`)}>
172
166
  {hasAvatar && this.renderAvatar()}
173
167
  {hasThumbnail && this.renderThumbnail()}
174
168
  <ListItem.Part middle column containerStyle={[styles.border, {marginLeft: 18}]}>
@@ -247,16 +241,17 @@ export default class SkeletonViewScreen extends Component {
247
241
  const imageSize = this.getImageSize();
248
242
 
249
243
  return (
250
- <View row spread margin-page>
251
- <SkeletonView
252
- width={imageSize}
253
- height={imageSize}
254
- showContent={isDataAvailable}
255
- renderContent={this.renderImagesData}
256
- accessibilityLabel={'Loading image'}
257
- times={IMAGE_URIS.length}
258
- />
259
- </View>
244
+ <SkeletonView
245
+ row
246
+ spread
247
+ margin-page
248
+ width={imageSize}
249
+ height={imageSize}
250
+ showContent={isDataAvailable}
251
+ renderContent={this.renderImagesData}
252
+ accessibilityLabel={'Loading image'}
253
+ times={IMAGE_URIS.length}
254
+ />
260
255
  );
261
256
  };
262
257
 
@@ -317,6 +312,40 @@ export default class SkeletonViewScreen extends Component {
317
312
  );
318
313
  };
319
314
 
315
+ renderCustom = () => {
316
+ const {isDataAvailable} = this.state;
317
+
318
+ return (
319
+ <View margin-20>
320
+ <View row spread marginB-8>
321
+ <SkeletonView
322
+ width={120}
323
+ height={20}
324
+ borderRadius={5}
325
+ showContent={isDataAvailable}
326
+ renderContent={() => <Text text60BO>Lorem Ipsum</Text>}
327
+ />
328
+ <SkeletonView
329
+ width={40}
330
+ height={10}
331
+ borderRadius={5}
332
+ style={{marginTop: 5}}
333
+ showContent={isDataAvailable}
334
+ renderContent={() => <Button label={'Info'} size={Button.sizes.small} link/>}
335
+ />
336
+ </View>
337
+ <SkeletonView
338
+ shimmerStyle={{width: '100%' /* , height: 30 */}}
339
+ height={10}
340
+ borderRadius={5}
341
+ showContent={isDataAvailable}
342
+ renderContent={() => <Text>Lorem Ipsum is simply dummy text of the industry.</Text>}
343
+ colors={[Colors.red70, Colors.red50, Colors.red70]}
344
+ />
345
+ </View>
346
+ );
347
+ };
348
+
320
349
  renderContent = () => {
321
350
  const {isDataAvailable} = this.state;
322
351
  return (
@@ -345,12 +374,14 @@ export default class SkeletonViewScreen extends Component {
345
374
  case LIST_TYPE.Thumbnail:
346
375
  return this.renderListItemsWithThumbnail();
347
376
  }
377
+ case DATA_TYPE.Content:
378
+ return this.renderContent();
348
379
  case DATA_TYPE.Images:
349
380
  return this.renderImages();
350
381
  case DATA_TYPE.Avatars:
351
382
  return this.renderAvatarStrip();
352
- case DATA_TYPE.Content:
353
- return this.renderContent();
383
+ case DATA_TYPE.Custom:
384
+ return this.renderCustom();
354
385
  }
355
386
  };
356
387
 
@@ -385,7 +416,7 @@ const styles = StyleSheet.create({
385
416
  paddingLeft: Spacings.s5
386
417
  },
387
418
  avatar: {
388
- marginHorizontal: 14
419
+ marginVertical: 8
389
420
  },
390
421
  image: {
391
422
  flex: 1,
@@ -196,7 +196,7 @@ const styles = StyleSheet.create({
196
196
  height: 20,
197
197
  borderRadius: 4,
198
198
  borderWidth: 1,
199
- borderColor: Colors.$outlineNeutral
199
+ borderColor: Colors.$outlineDefault
200
200
  },
201
201
  group: {
202
202
  backgroundColor: Colors.$backgroundNeutralMedium,
@@ -1,7 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import React, {Component} from 'react';
3
3
  import {ScrollView} from 'react-native';
4
- import {View, Text, Button, StackAggregator} from 'react-native-ui-lib';
4
+ import {Colors, View, Text, Button, StackAggregator} from 'react-native-ui-lib';
5
5
 
6
6
 
7
7
  const contents = [
@@ -32,7 +32,7 @@ export default class StackAggregatorScreen extends Component {
32
32
 
33
33
  render() {
34
34
  return (
35
- <ScrollView bg-grey80 keyboardShouldPersistTaps={'handled'} showsVerticalScrollIndicator={false}>
35
+ <ScrollView keyboardShouldPersistTaps={'handled'} showsVerticalScrollIndicator={false}>
36
36
  <Text center grey40 text90 marginT-20>Thu, 10 Dec, 11:29</Text>
37
37
  <StackAggregator
38
38
  containerStyle={{marginTop: 12}}
@@ -48,7 +48,7 @@ export default class StackAggregatorScreen extends Component {
48
48
  containerStyle={{marginTop: 12}}
49
49
  onItemPress={this.onItemPress}
50
50
  collapsed={false}
51
- // contentContainerStyle={{backgroundColor: Colors.red30}}
51
+ contentContainerStyle={{backgroundColor: Colors.red70}}
52
52
  // itemBorderRadius={10}
53
53
  // buttonProps={{color: Colors.green30, labelStyle: {...Typography.text80, fontWeight: '500'}}}
54
54
  >
@@ -174,7 +174,7 @@ class TabControllerScreen extends Component<{}, State> {
174
174
  // iconColor={'green'}
175
175
  // selectedIconColor={'blue'}
176
176
  enableShadow
177
- activeBackgroundColor={Colors.blue60}
177
+ activeBackgroundColor={Colors.$backgroundGeneralLight}
178
178
  centerSelected={centerSelected}
179
179
  >
180
180
  {/* {this.renderTabItems()} */}
@@ -110,7 +110,7 @@ export default class ToastsScreen extends Component {
110
110
  // backgroundColor={Colors.$backgroundSuccess}
111
111
  // icon={Assets.icons.demo.add}
112
112
  // iconColor={Colors.$backgroundSuccessHeavy}
113
- // style={{borderWidth: 1, borderColor: Colors.$outlineNeutralMedium}}
113
+ // style={{borderWidth: 1, borderColor: Colors.$outlineDisabled}}
114
114
  // messageStyle={Typography.text80BO}
115
115
  >
116
116
  {isCustomContent ? this.renderCustomContent() : undefined}