Skip to content

Latest commit

 

History

History
executable file
·
45 lines (37 loc) · 1.78 KB

README.md

File metadata and controls

executable file
·
45 lines (37 loc) · 1.78 KB

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>
);