-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.js
65 lines (61 loc) · 1.47 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import React, {Component} from 'react';
import {View, StyleSheet, Text, FlatList} from 'react-native';
import CollapsibleToolbar from './components/CollaspibleToolbar';
import {Colors} from './utils/Colors';
const exercises = [
'Running',
'Jogging',
'PushUps',
'Squats',
'Dumbbell rows',
'Dead Lifts',
'Single-leg deadlifts',
'Burpees',
'Side planks',
'Situps',
'Glute bridge',
'Side Plank with Straight Leg',
'Rope Skipping',
'Supine Pelvic Tilts',
'Standing Calf Raises - Wall',
'Single Leg Stand',
];
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<CollapsibleToolbar
title={'Exercises'}
headerColor={Colors.primary}
headerColorDark={Colors.primaryDark}
image={require('./assets/sports.png')}
backPress={this.backPress}>
<FlatList
data={exercises}
renderItem={({item, index}) => (
<Text style={styles.item}>{item}</Text>
)}
keyExtractor={index => index.toString()}
ItemSeparatorComponent={() => <View style={styles.separator} />}
/>
</CollapsibleToolbar>
</View>
);
}
backPress = () => {
alert('Navigate Back');
};
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
item: {
paddingVertical: 20,
paddingHorizontal: 20,
},
separator: {
height: 1,
backgroundColor: Colors.gray,
},
});