0.1.1 • Published 5 years ago

react-epg v0.1.1

Weekly downloads
8
License
GNU GPLv3
Repository
github
Last release
5 years ago

React EPG

License: GPL v3 npm version Build Status codecov Mutation testing badge Codacy Badge

Installation

npm i --save react-epg

Usage

Documentation

Examples

import EPG, { Channel, TimeLine, TimeSlot, Show } from 'react-epg';

const MyEPG = () => (
  <EPG>
    <TimeLine channel={<Channel name="Sky" />}>
      <TimeSlot start={new Date('1/1/97 16:00')} end={new Date('1/1/97 16:30')}>
        <Show title="The Simpsons" />
      </TimeSlot>
      <TimeSlot start={new Date('1/1/97 16:30')} end={new Date('1/1/97 17:30')}>
        <Show title="Inception" />
      </TimeSlot>
    </TimeLine>
    <TimeLine channel={<Channel name="Dave" />}>
      <TimeSlot start={new Date('1/1/97 16:00')} end={new Date('1/1/97 17:00')}>
        <Show title="Top Gear" />
      </TimeSlot>
      <TimeSlot start={new Date('1/1/97 17:00')} end={new Date('1/1/97 18:45')}>
        <Show title="Shrek 3" />
      </TimeSlot>
    </TimeLine>
  </EPG>
);