brunokiafuka / react-native-chrono

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“† react-native-chrono πŸ“†

An awesome react native agenda

Warning

This package is still under development and should not be used in production apps.

Installation

npm install react-native-chrono

or

yarn add react-native-chrono

Usage

import { Agenda } from "react-native-chrono";
// ...

const events = [
  {
    id: "1",
    startDate: "2024-02-23T07:00:55.304Z",
    endDate: "2024-02-23T07:50:55.304Z",
  },
]

 <Agenda
    startHour={8}
    endHour={22}
    data={events}
    itemSize={100}
    renderTimeSlot={({ item }) => {
      return (
        <View style={styles.timeSlot}>
          <Text>{item}</Text>
        </View>
      );
    }}
    renderEvent={({ item, index, height }) => (
      <View key={item.id} style={{ height }}>
        <Text>{item.startDate}</Text>
        <Text>{item.endDate}</Text>
      </View>
    )}
/>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Happy hacking πŸš€

License

MIT


Made with create-react-native-library

About

License:MIT License


Languages

Language:TypeScript 83.1%Language:JavaScript 16.9%