Coder Social home page Coder Social logo

thegamenicorus / react-native-timeline-listview Goto Github PK

View Code? Open in Web Editor NEW
1.2K 27.0 184.0 172 KB

Timeline component for React Native App

Home Page: https://www.npmjs.com/package/react-native-timeline-listview

License: MIT License

JavaScript 100.00%
react-native timeline schedule android ios

react-native-timeline-listview's Introduction

React Native Timeline Listview

Timeline component for React Native App work for Android and iOS

untitled-1

Table of Contents

Installation

npm i react-native-timeline-listview --save

Basic Usage

image2

import Timeline from 'react-native-timeline-listview'

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(){
    return(
        <Timeline
          data={this.data}
        />
    )
}

see full basic example

Custom

image3

render(){
    return(
        <Timeline
          //..other props
          circleSize={20}
          circleColor='rgb(45,156,219)'
          lineColor='rgb(45,156,219)'
          timeContainerStyle={{minWidth:52, marginTop: -5}}
          timeStyle={{textAlign: 'center', backgroundColor:'#ff9797', color:'white', padding:5, borderRadius:13}}
          descriptionStyle={{color:'gray'}}
          options={{
            style:{paddingTop:5}
          }}
        />
    )
}

see full custom example

Circle Dot

image4

render(){
    return(
        <Timeline
          //..other props
          innerCircle={'dot'}
        />
    )
}

see full circle dot example

Icon

image5

constructor(){
    super()
    this.data = [
      {time: '09:00', title: 'Archery Training', description: 'The Beginner Archery and Beginner Crossbow course does not require you to bring any equipment, since everything you need will be provided for the course. ',lineColor:'#009688', icon: require('../img/archery.png')},
      {time: '10:45', title: 'Play Badminton', description: 'Badminton is a racquet sport played using racquets to hit a shuttlecock across a net.', icon: require('../img/badminton.png')},
      {time: '12:00', title: 'Lunch', icon: require('../img/lunch.png')},
      {time: '14:00', title: 'Watch Soccer', description: 'Team sport played between two teams of eleven players with a spherical ball. ',lineColor:'#009688', icon: require('../img/soccer.png')},
      {time: '16:30', title: 'Go to Fitness center', description: 'Look out for the Best Gym & Fitness Centers around me :)', icon: require('../img/dumbbell.png')}
    ]
  }
render(){
    return(
        <Timeline
          //..other props
          innerCircle={'icon'}
        />
    )
}

see full icon example

Override Render

image6

constructor(){
    super()
    this.renderEvent = this.renderEvent.bind(this)

    this.data = [
      {
        time: '09:00',
        title: 'Archery Training',
        description: 'The Beginner Archery and Beginner Crossbow course does not require you to bring any equipment, since everything you need will be provided for the course. ',
        lineColor:'#009688',
        icon: require('../img/archery.png'),
        imageUrl: 'https://cloud.githubusercontent.com/assets/21040043/24240340/c0f96b3a-0fe3-11e7-8964-fe66e4d9be7a.jpg'
      },
      {
        time: '10:45',
        title: 'Play Badminton',
        description: 'Badminton is a racquet sport played using racquets to hit a shuttlecock across a net.',
        icon: require('../img/badminton.png'),
        imageUrl: 'https://cloud.githubusercontent.com/assets/21040043/24240405/0ba41234-0fe4-11e7-919b-c3f88ced349c.jpg'
      },
      {
        time: '12:00',
        title: 'Lunch',
        icon: require('../img/lunch.png'),
      },
      {
        time: '14:00',
        title: 'Watch Soccer',
        description: 'Team sport played between two teams of eleven players with a spherical ball. ',
        lineColor:'#009688',
        icon: require('../img/soccer.png'),
        imageUrl: 'https://cloud.githubusercontent.com/assets/21040043/24240419/1f553dee-0fe4-11e7-8638-6025682232b1.jpg'
      },
      {
        time: '16:30',
        title: 'Go to Fitness center',
        description: 'Look out for the Best Gym & Fitness Centers around me :)',
        icon: require('../img/dumbbell.png'),
        imageUrl: 'https://cloud.githubusercontent.com/assets/21040043/24240422/20d84f6c-0fe4-11e7-8f1d-9dbc594d0cfa.jpg'
      }
    ]
  }

renderDetail(rowData, sectionID, rowID) {
    let title = <Text style={[styles.title]}>{rowData.title}</Text>
    var desc = null
    if(rowData.description && rowData.imageUrl)
      desc = (
        <View style={styles.descriptionContainer}>   
          <Image source={{uri: rowData.imageUrl}} style={styles.image}/>
          <Text style={[styles.textDescription]}>{rowData.description}</Text>
        </View>
      )

    return (
      <View style={{flex:1}}>
        {title}
        {desc}
      </View>
    )
  }

render(){
    return(
        <Timeline
          //..other props
          renderEvent={this.renderEvent}
        />
    )
}

see full override render example

Pull to refresh and load more

rflm

onRefresh(){
  //set initial data
}

onEndReached() {
  //fetch next data
}

renderFooter() {
    //show loading indicator
    if (this.state.waiting) {
        return <ActivityIndicator />;
    } else {
        return <Text>~</Text>;
    }
}

render(){
    return(
        <Timeline
          //..other props
          options={{
            refreshControl: (
              <RefreshControl
                refreshing={this.state.isRefreshing}
                onRefresh={this.onRefresh}
              />
            ),
            renderFooter: this.renderFooter,
            onEndReached: this.onEndReached
          }}
        />
    )
}

see full refresh and load more example

Column Format

Single Column Right

simulator screen shot apr 6 2560 be 5 19 51 pm

render(){
    return(
        <Timeline
          //..other props
          columnFormat='single-column-right'
        />
    )
}

see full single column right example

Two Column

simulator screen shot apr 6 2560 be 5 05 32 pm

render(){
    return(
        <Timeline
          //..other props
          columnFormat='two-column'
        />
    )
}

see full two column example

Time container hiding

showTime

render(){
    return(
        <Timeline
          //..other props
          showTime={false}
        />
    )
}

Configuration

Data Object:

Property Type Default Description
time string null event time
title string null event title
description string null event description
lineWidth int same as lineWidth of 'Timeline' event line width
lineColor string same as lineColor of 'Timeline' event line color
circleSize int same as circleSize of 'Timeline' event circle size
circleColor string same as circleColor of 'Timeline' event circle color
dotColor string same as dotColor of 'Timeline' event dot color (innerCircle = 'dot')
icon obj(image source) same as icon of 'Timeline' event icon (innerCircle = 'color')

Timeline:

Property Type Default Description
data data object null timeline data
innerCircle string null timeline mode : 'none', 'dot', 'icon'
separator bool true render separator line of events
columnFormat string 'single-left' can be 'single-column-left', 'single-column-right', 'two-column'
lineWidth int 2 timeline line width
lineColor string '#007AFF' timeline line color
circleSize int 16 timeline circle size
circleColor string '#007AFF' timeline circle color
dotColor string 'white' timeline dot color (innerCircle = 'dot')
icon obj(image source) null timeline icon (innerCircle = 'color')
style object null custom styles of Timeline container
listViewStyle object null custom styles of inner ListView
timeStyle object null custom styles of event time
titleStyle object null custom styles of event title
descriptionStyle object null custom styles of event description
iconStyle object null custom styles of event icon
separatorStyle object null custom styles of separator
rowContainerStyle object null custom styles of event container
timeContainerStyle object null custom styles of container of event time
detailContainerStyle object null custom styles of container of event title and event description
onEventPress function(event) null function to be invoked when event was pressed
renderTime function(rowData, sectionID, rowID) null custom render event time
renderDetail function(rowData, sectionID, rowID) null custom render event title and event description
renderCircle function(rowData, sectionID, rowID) null custom render circle
renderFullLine bool false render event border on last timeline item
options object null ListView properties
showTime boolean true Time container options

Shift problem

Text width of event time may not be the same.

untitled-1

fix by add 'minWidth' in 'timeContainerStyle' to appropriate value

render(){
    return(
        <Timeline
          //..other props
          timeContainerStyle={{minWidth:72}}
        />
    )
}

Timeline is rendered, but not displayed until scroll

fix by add removeClippedSubviews: false into options

render(){
    return(
        <Timeline
          //..other props
          options={{
            removeClippedSubviews: false
          }}
        />
    )
}

react-native-timeline-listview's People

Contributors

aswinmohanme avatar ngnclht1102 avatar rodrix avatar thegamenicorus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-timeline-listview's Issues

In 2 column layout specify which entries should be left or right side?

Is there anyway in which I can specify which side should the entries be(left or right side of line).

I have a requirement in which I want to show deposit and withdrawals from a bank account. I was thinking all withdrawals to be on the left side while all deposits on the right side of the line.

Any help here please?

Adding to timeline

Hi!
I'm having trouble adding a new event to the timeline. Here's my code:

screen shot 2018-05-01 at 9 26 00 pm

screen shot 2018-05-01 at 9 26 38 pm

When I click on the touchable highlight, a new event is created but with no additional data.

img_5765

Your help would be very much appreciated!

Not all icons are shown

image

I dynamically set the this.data array, however some icons are shown and first 11 ones are not.
I tried to check the data array and the data looks correct.

[{"time":"April 10, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"May 3, 2018","title":"Today","description":"","lineColor":"#009688","icon":31},{"time":"May 6, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"May 8, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"June 3, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"June 5, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"July 1, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"July 3, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"July 29, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"July 31, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"August 26, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"August 28, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"September 23, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"September 25, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"October 21, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"October 23, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"November 18, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"November 20, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"December 16, 2018","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"December 18, 2018","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"January 13, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"January 15, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"February 10, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"February 12, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"March 10, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"March 12, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"April 7, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"April 9, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"May 5, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"May 7, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"June 2, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"June 4, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"June 30, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"July 2, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"July 28, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"July 30, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"August 25, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"August 27, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"September 22, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"September 24, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"October 20, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"October 22, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"November 17, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"November 19, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"December 15, 2019","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"December 17, 2019","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"January 12, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"January 14, 2020","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"February 9, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"February 11, 2020","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"March 8, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"March 10, 2020","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"April 5, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"April 7, 2020","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"May 3, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"May 5, 2020","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"May 31, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32},{"time":"June 2, 2020","title":"Pill Cycle Start","description":"","lineColor":"#009688","icon":30},{"time":"June 28, 2020","title":"Pill Cycle End","description":"","lineColor":"#009688","icon":32}]

How do you handling renderSelected to put it inside renderDetail() ?

I have this code :

class Medicine extends Component {
  constructor(){
    super()
    this.onEventPress = this.onEventPress.bind(this)
    this.renderSelected = this.renderSelected.bind(this)
    this.renderDetail = this.renderDetail.bind(this)
    this.state = {selected: '', visible:false}
  }

  onEventPress(data){
    this.setState({selected: data, visible:true})
  }

  renderImage(){
    console.log(this.state.selected)
    return <Image style={{width:DeviceWidth*0.3, height:DeviceWidth*0.3}} source={{uri: this.state.selected.url}}/>
  }

  renderDetail(rowData, sectionID, rowID){
    let title = <Text style={[global.global.SubHeaderText, {color:'green'}]}>{rowData.time}</Text>
    var desc = (
      <View>
        <View style={{flexDirection:'row'}}>
          <Text style={[global.global.TextBold, {width:DeviceWidth*0.17}]}>Radiology </Text>
          <Text style={[global.global.Text, {flexWrap:'wrap', width:DeviceWidth*0.7}]}>{rowData.cat}</Text>
        </View>
        <View style={{flexDirection:'row'}}>
          <Text style={[global.global.TextBold, {width:DeviceWidth*0.17}]}>Description </Text>      
          <Text style={[global.global.Text, {flexWrap:'wrap', width:DeviceWidth*0.7}]}>{rowData.description == null ? '-' : rowData.description}</Text>      
        </View>
        {this.renderImage()}
      </View>
    )
    return (
      <View style={{flex:1}}>
        {title}
        {desc}
      </View>
    )
  }

  render() {
    return (
      <View style={{flex:1}}>
        <Timeline 
          style={{flex: 1, marginTop:20}}
          showTime={false}
          separator={true}
          renderFullLine={true}
          circleColor={'green'}
          lineColor={'green'}
          data={this.data}
          onEventPress={this.onEventPress}
          renderDetail={this.renderDetail}
        />
      </View>
    );
  }
}

I want to show image on specific listview, but everytime I pressed an object of Listview, the image showing on all listview with the same image I've pressed,

How to displaying only one image while onPressed triggered?

External Data File

Having some issues when trying to use data imported from another file
import { trainingData } from '../data/trainingData_en';
this.data = [
{ trainingData }
]

The data file is setup in exact same way as in the example but only works if the data is actually in same file

Animated Line

Can we animate the line from top to bottom by filling the line colour one by one?

editor form

thanks for your lib, just a little question:
what would you suggest to do if implement the feature like onPress the data to edit them?

popup or navigate another view?
and after that dynamically change the data set?

finally would you provide the example in readme?

appreciate about your work again.

How to set doted/dashed line?

I can see, it has lineColor and lineWidth properties, but I would like to have some lines dotted. Is there a way to have custom lineStyle?

Render Circle displays icons to far right of 2 column

Im trying to display a custom view for the circle in the middle of the two column timeline. I use the renderCircle method and i can see that my custom view is being rendered. THe only issue is that the custom circle is being rendered to the far right of the screen instead of down the middle line that is rendered. Do i maybe need to change more styles or is this a bug?

Date first

Hello,

It´s possible to add the date also?

Bind props render methods to this

The renderTime, renderCircle and renderDetail that you can override do not bound this to the component instance itself. This makes a reuse of the original render functions impossiblen which is useful if you want to add conditional rendering. Also, you cannot reach this.state, which, for instance, causes issues with positioning the circle.

I propose to use

this.renderTime = (this.props.renderTime?this.props.renderTime:this._renderTime).bind(this)
this.renderDetail = (this.props.renderDetail?this.props.renderDetail:this._renderDetail).bind(this)
this.renderCircle = (this.props.renderCircle?this.props.renderCircle:this._renderCircle).bind(this)

List View is not renderring

I have used the Basic Usage timeline list view in my ract-native page. It worked for its default data.
But when i include data via componentWillMount()

componentWillMount(){
    var list = CustomerStore.usagelist;
    this.setState({data:list});
    console.log(JSON.stringify(list));
}

the log is printing the data before runnning the render() but the listview is not showing
instead it throws a warning

Warning: In next release empty section headers will be rendered. In this release you can use 'enableEmptySections' flag to render empty section headers.

I have also used the flag, but there is no use.
<Timeline data={this.state.data} enableEmptySections={true} />
anybody have a solution for this...
I am using React-Native :0.38

Unable to build release

Hi.. i got problem when generating release apk.. the error say:

android/app/build/intermediates/res/merged/release/drawable-mdpi/node_modules_reactnativetimelinelistview_node_modules_reactnativeelements_src_rating_images_heart.png: error: Invalid filename.

Can I put renderScrollComponent as options

Hi,
I am trying to implement this project on another project.
I added this project with the refresh option but when I try to refresh, it is not working. If I do some modification to it the listview refresher activate itself and doesn't stop when hot reload is activated.

On the link on top you can find a sample of the project with a listview and they use the renderScrollComponent argument to add the project. So what I am asking is can I use the "options" option from the timeline-listview and use it at renderScrollComponent ? ( I already tried but no results)

Thank you

iOS - Icon not loading sometimes

This library is awesome, thanks.

I noticed that sometimes, my icon does not render, leaving the icon and the circle completely empty, they show up after re-rendering the screen...

I am setting the icon in the following way, in the Timeline props:
icon = {require('./path_to_icon.png'}

I will try setting the icon in the data object...
Sorry if i am missing something.

How to add custom view

Instead of having some predefined data like title, description, etc, how can I have extra detail bcz it is something basic! but this component forces me to use the same rules. is there any way to customize it?

Line overlaps the icon

Im having this issue. I've tried to add zIndex to iconStyle but it didnt work. Please help
46473964_194666951436509_3897160922463993856_n

Does this library support Redux or dynamic rendering?

I want to use this library to one of my project that when user swipe to the top of the timeline, it can show a loading indicator and then update the timeline, and when the user swipe to near the end of the timeline, the timeline will automatically update more data and append to the timeline

Icon not showing in android

In android, icon does not appear. Is icon supported for android?
I have set data[0].icon require('../../img/dot-green.png'); and innerCircle={'icon'}
Still, icon not showing?

Modern Timeline update (aka FlatList support)

I needed a FlatList version of this great repo (thanks @thegamenicorus).
I was going to create a fork and then merge in, but unfortunately this repo has been dormant for ~7months.

For that reason, I've created a new repo called react-native-timeline-feed, which is entirely based off this repo with the exception of using a FlatList instead (and other things like flow).

I'll also be going through the issues listed here and see if they apply (and potentially fix) on the new repo.

Cheers!

Not shown on android

I recently used this component, which is displayed on ios, but cannot be displayed on android

Display date and time in two rows

I want to display the date and time as the time (e.g. 01/01/2018 10:09 AM instead of only 10:09 AM) but if I do that, the time column takes too much space (i.e. his width is too large).

So, is there a way to display the time in two rows?

What I want is the time to be displayed like:

01/01/2018
10:09 AM

Instead of being displayed like:

01/01/2018 10:09 AM

Timeline now show until first scroll

simulator screen shot - iphone 6 - 2017-11-14 at 04 28 48

simulator screen shot - iphone 6 - 2017-11-14 at 04 30 33

I have a timeline view after a normal view. However,the timeline can only be shown after i scroll the view a little bit. Situation is the same even i removed the upper view.


 constructor(props){
    super(props)
    this.state = {
      data: [
        {time: '09:00', title: 'Archery Training', description: 'The Beginner Archery and Beginner Crossbow course does not require you to bring any equipment, since everything you need will be provided for the course. ', circleColor: '#009688',lineColor:'#009688'},
        {time: '10:45', title: 'Play Badminton', description: 'Badminton is a racquet sport played using racquets to hit a shuttlecock across a net.'},
        {time: '12:00', title: 'Lunch'},
        {time: '14:00', title: 'Watch Soccer', description: 'Team sport played between two teams of eleven players with a spherical ball. ',lineColor:'#009688'},
        {time: '16:30', title: 'Go to Fitness center', description: 'Look out for the Best Gym & Fitness Centers around me :)', circleColor: '#009688'}
      ]
    };
  }

  renderTimeline(){

    return(
      <Timeline
      circleSize={20}
      circleColor='rgb(45,156,219)'
      lineColor='rgb(45,156,219)'
      timeContainerStyle={{minWidth:52, marginTop: -5}}
      timeStyle={{textAlign: 'center', backgroundColor:'#ff9797', color:'white', padding:5, borderRadius:13}}
      descriptionStyle={{color:'gray'}}
      options={{
        style:{flex: 1, paddingTop:5 }
      }}
      data={this.state.data}
      />
    )
  }


  render() {
    return(
      <Content style={styles.container} >

      <View style={styles.caseDetailBox}>
      <Text style={{textDecorationLine: 'underline',alignSelf: 'center' ,marginBottom: '5%'}}> Order Summary </Text>
      <Text style={styles.caseDetailText}> Time: </Text>
      <Text style={styles.caseDetailText}> Address: </Text>
      <Text style={styles.caseDetailText}> Category: </Text>
      </View>

      {this.renderTimeline()}

      </Content>
    )
  }
}

renderDetail, NOT renderEvent

I think there is a typo or something in the ReadMe, at the Override Render feature.

You suppose to use "renderDetail" props, NOT "renderEvent".

This took me 15' looking back and forth your documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.