-
Notifications
You must be signed in to change notification settings - Fork 184
/
basicExample.js
51 lines (47 loc) · 1.09 KB
/
basicExample.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
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import Timeline from 'react-native-timeline-listview'
export default class Example extends Component {
constructor(){
super()
this.data = [
{time: '09:00', title: 'Event 1', description: 'Event 1 Description'},
{time: '10:45', title: 'Event 2', description: 'Event 2 Description'},
{time: '12:00', title: 'Event 3', description: 'Event 3 Description'},
{time: '14:00', title: 'Event 4', description: 'Event 4 Description'},
{time: '16:30', title: 'Event 5', description: 'Event 5 Description'}
]
}
render() {
//'rgb(45,156,219)'
return (
<View style={styles.container}>
<Timeline
style={styles.list}
data={this.data}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 20,
paddingTop:65,
backgroundColor:'white'
},
list: {
flex: 1,
marginTop:20,
},
});