1.1.3 • Published 7 years ago

react-heat-calendar v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

React Heat Calendar

Like a Github's contribution calendar.

Installation

Install the npm module:

yarn add react-heat-calendar
# Or
npm install react-heat-calendar

Usage

Import the component:

import HeatCalendar from 'react-heat-calendar';

<HeatCalendar
  beginDate={new Date('2016-12-01')} // optional
  endDate={new Date('2017-01-31')}   // optional
  dateField="date"                   // optional
  data={[
    { date: '2016-12-02', someAttr: "foo" },
    { date: '2016-12-03', someAttr: "bar" },
    { date: '2016-12-03', someAttr: "baz" },
    // ...and so on
  ]}
/>

Defaults

propertyvalue
beginDatestart date of minimum month in the data
endDateend date of maximum month in the data
dateField"date"

Development

  • Development server npm start.
  • Continuously run tests on file changes npm run watch-test;
  • Run tests: npm test;
  • Build npm run build;