1
- import _ from 'lodash' ;
2
1
import React , { Component } from 'react' ;
3
2
import { StyleSheet , ScrollView , LayoutAnimation } from 'react-native' ;
4
3
import {
@@ -9,33 +8,33 @@ import {
9
8
Drawer ,
10
9
Text ,
11
10
Button ,
12
- Avatar ,
11
+ Avatar
13
12
} from 'react-native-ui-lib' ; //eslint-disable-line
14
13
import { gestureHandlerRootHOC } from 'react-native-gesture-handler' ;
15
14
import conversations from '../../data/conversations' ;
16
15
17
16
import {
18
17
renderBooleanOption ,
19
18
renderSliderOption ,
20
- renderColorOption ,
19
+ renderColorOption
21
20
} from '../ExampleScreenPresenter' ;
22
21
23
22
const ITEMS = {
24
23
read : {
25
24
icon : require ( '../../assets/icons/mail.png' ) ,
26
25
text : 'Read' ,
27
- background : Colors . green30 ,
26
+ background : Colors . green30
28
27
} ,
29
28
archive : {
30
29
icon : require ( '../../assets/icons/archive.png' ) ,
31
30
text : 'Archive' ,
32
- background : Colors . blue30 ,
31
+ background : Colors . blue30
33
32
} ,
34
33
delete : {
35
34
icon : require ( '../../assets/icons/delete.png' ) ,
36
35
text : 'Delete' ,
37
- background : Colors . red30 ,
38
- } ,
36
+ background : Colors . red30
37
+ }
39
38
} ;
40
39
41
40
class DrawerScreen extends Component {
@@ -47,7 +46,7 @@ class DrawerScreen extends Component {
47
46
showRightItems : true ,
48
47
fullSwipeRight : true ,
49
48
showLeftItem : true ,
50
- fullSwipeLeft : true ,
49
+ fullSwipeLeft : true
51
50
} ;
52
51
}
53
52
@@ -63,14 +62,14 @@ class DrawerScreen extends Component {
63
62
LayoutAnimation . configureNext ( {
64
63
update : {
65
64
type : LayoutAnimation . Types . easeInEaseOut ,
66
- property : LayoutAnimation . Properties . scaleY ,
65
+ property : LayoutAnimation . Properties . scaleY
67
66
} ,
68
67
delete : {
69
68
type : LayoutAnimation . Types . easeInEaseOut ,
70
69
property : LayoutAnimation . Properties . scaleY ,
71
- duration : 2000 ,
70
+ duration : 2000
72
71
} ,
73
- duration : 120 ,
72
+ duration : 120
74
73
} ) ;
75
74
this . setState ( { hideItem : true } ) ;
76
75
} , 200 ) ;
@@ -178,7 +177,7 @@ class DrawerScreen extends Component {
178
177
itemsTintColor,
179
178
bounciness,
180
179
itemsIconSize,
181
- hideItem,
180
+ hideItem
182
181
} = this . state ;
183
182
184
183
const drawerProps = {
@@ -189,7 +188,7 @@ class DrawerScreen extends Component {
189
188
fullSwipeRight,
190
189
onFullSwipeRight : this . onFullSwipe ,
191
190
fullSwipeLeft,
192
- onWillFullSwipeLeft : this . onFullSwipe ,
191
+ onWillFullSwipeLeft : this . onFullSwipe
193
192
} ;
194
193
if ( showRightItems ) {
195
194
drawerProps . rightItems = [ ITEMS . read , ITEMS . archive ] ;
@@ -242,13 +241,13 @@ class DrawerScreen extends Component {
242
241
min : 5 ,
243
242
max : 15 ,
244
243
step : 1 ,
245
- initial : 5 ,
244
+ initial : 5
246
245
} ) }
247
246
{ renderSliderOption . call ( this , 'iconSize' , 'itemsIconSize' , {
248
247
min : 15 ,
249
248
max : 25 ,
250
249
step : 1 ,
251
- initial : 20 ,
250
+ initial : 20
252
251
} ) }
253
252
</ View >
254
253
</ ScrollView >
@@ -259,43 +258,43 @@ class DrawerScreen extends Component {
259
258
260
259
const styles = StyleSheet . create ( {
261
260
container : {
262
- backgroundColor : Colors . white ,
261
+ backgroundColor : Colors . white
263
262
} ,
264
263
contentContainer : {
265
- paddingBottom : 50 ,
264
+ paddingBottom : 50
266
265
} ,
267
266
drawer : {
268
- marginTop : 20 ,
267
+ marginTop : 20
269
268
} ,
270
269
listContent : {
271
- backgroundColor : Colors . dark80 ,
270
+ backgroundColor : Colors . dark80
272
271
} ,
273
272
rowContent : {
274
273
flexDirection : 'row' ,
275
274
alignItems : 'center' ,
276
- backgroundColor : Colors . dark80 ,
275
+ backgroundColor : Colors . dark80
277
276
} ,
278
277
rowIcon : {
279
278
width : 38 ,
280
279
height : 38 ,
281
280
borderRadius : 19 ,
282
281
backgroundColor : Colors . violet40 ,
283
- margin : 20 ,
282
+ margin : 20
284
283
} ,
285
284
rowTitle : {
286
285
...Typography . text70 ,
287
286
fontWeight : 'bold' ,
288
- color : Colors . dark20 ,
287
+ color : Colors . dark20
289
288
} ,
290
289
rowSubtitle : {
291
290
...Typography . text80 ,
292
- color : Colors . dark30 ,
291
+ color : Colors . dark30
293
292
} ,
294
293
rowButtonContainer : {
295
294
flex : 1 ,
296
295
alignItems : 'flex-end' ,
297
- padding : 10 ,
298
- } ,
296
+ padding : 10
297
+ }
299
298
} ) ;
300
299
301
300
export default gestureHandlerRootHOC ( DrawerScreen ) ;
0 commit comments