brunokiafuka / react-native-chrono

MIT License
0 stars 0 forks source link

📆 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