Skip to content

behzadrohizadeh/react-native-event-flatlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-native-event-flatlist

A React Native Flatlist Componnet For Event

Demo

alt text

Install

npm i react-native-event-flatlist

Usage

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import EventList from"./component/EventList";


const datalist=[
             {title:"One Piece ",date:"28 Jul 2014",image:"https://farm4.staticflickr.com/3100/2693171833_3545fb852c_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#EC407A"},
             {title:"Unlimited World Red",date:"28 JAN 2015",image:"https://farm4.staticflickr.com/3100/2693171833_3545fb852c_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#8E24AA"},
             {title:"Wine",date:"28 Jul 2014",image:"https://farm5.staticflickr.com/4150/5045502202_1d867c8a41_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#EC407A"},
             {title:"Live On Tour",date:"28 JAN 2016",image:"https://farm4.staticflickr.com/3100/2693171833_3545fb852c_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#7B1FA2"},
             {title:"Tour",date:"28 Jul 2014",image:"https://farm5.staticflickr.com/4150/5045502202_1d867c8a41_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#EC407A"},
             {title:"Component",date:"28 JAN 2017",image:"https://farm4.staticflickr.com/3100/2693171833_3545fb852c_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#283593"},
             {title:"Hopping",date:"28 Jul 2019",image:"https://farm5.staticflickr.com/4150/5045502202_1d867c8a41_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#EC407A"},
             {title:"Dance",date:"28 JAN 2019",image:"https://farm4.staticflickr.com/3100/2693171833_3545fb852c_q.jpg",desciption:"Bar Hopping in Erie, Pa",bgcolor:"#AD1457"},

             ]
export default class App extends Component<Props> {

  onpresed(item)
   {

    console.warn(item)
   }
  
  render() {
    return (
      <View style={styles.container}>
        <EventList
         data={datalist}
         onPressitem={this.onpresed}


         />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
   
  },
  
});

Props

Prop Type Note
data array array of list data
onPressitem func return data when user press on item

About

A React Native Flatlist Componnet For Event

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published