1.0.3 • Published 1 year ago

github-calendar-component v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

npm (scoped) NPM

Github calendar component

sample-image A reusable React component for displaying a Github-like calendar graph with customizable colors.

Installation

To install the package, use npm:

npm install github-calendar-component

Usage

First, import the component into your project:

import {Gitgraph} from 'github-calendar-component';

Using the Component

import React from 'react';
import {Gitgraph} from 'github-calendar-component';
// Sample test data
const testData = [
  { date: '2022-01-01T00:00:00.000Z', checked: true },
  { date: '2022-01-02T00:00:00.000Z', checked: false },
  // More data...
];

const App = () => {
  return (
    <div>
      <Gitgraph showMonthNames={true} color="blue" data={testData} />
    </div>
  );
};

export default App;

props

PropTypeDescriptionDefault
showMonthNamesbooleanDetermines whether month names are displayed.false
colorstringThe color to apply for checked dates.#39d353
dataArrayAn array of objects containing date and checked properties.
seperateMonthsbooleanDeterminne whether there is space between each monthfalse

Author

srivenkat13

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago