2.2.0 • Published 7 months ago

react-github-activity-calendar v2.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

npm npm Made by Justin Charo npm version npm

React Github Activity Calendar

React component for displaying a user's Github activity in a calendar format.

https://www.npmjs.com/package/react-github-activity-calendar

View on my Portfolio 😉

https://justin.charo.gg/

Installation

To install the package, run:

npm install --save react-github-activity-calendar

Usage/Examples

To use the Graph component in your React project, import it and include it in your component's render method:

import { Graph } from "react-github-activity-calendar";

function App() {
  const githubApiKey = ""; // <your-github-api-key>
  const githubUserName = ""; // <github-username>
  const bgcolor = "";
  const textColor = "";

  return (
    <div className="App">
      <Graph
        userName={githubUserName}
        backgroundColor={bgcolor}
        githubApiKey={githubApiKey}
        color={textColor}
      />
    </div>
  );
}

export default App;

Props

  • userName (required): The Github username for which to display activity.
  • githubApiKey (required): Your Github API key. It is requried that you generate your own API key from Github and pass it as a prop to the component If no API key is provided, the component will not be able to make requests to the Github API, to display your activity. I have provided steps to generate your api token below.
  • backgroundColor (optional): The background color of the calendar (hex color code, e.g. #ffffff).
  • color (optional): The color of the text and github icon(hex color code, e.g. #000000).

Generating a Github API Key

In case you forget where to see your tokens: https://github.com/settings/tokens To generate a Github API key, follow these steps:

    1. Sign in to your Github account.
    1. Go to your Settings page.
    1. Click on Developer settings in the left-hand menu.
    1. Click on Personal access tokens in the left-hand menu.
    1. Click on Generate new token.
    1. Give your token a name and select the scope to read:user.
    1. Click on Generate token.
    1. Copy the token and keep it somewhere safe.

Authors

Screenshots

App Screenshot

2.2.0

7 months ago

2.1.7

7 months ago

2.1.9

9 months ago

2.1.2

9 months ago

2.1.1

9 months ago

2.1.4

9 months ago

2.1.3

9 months ago

2.1.6

9 months ago

2.0.7

9 months ago

2.1.5

9 months ago

2.0.6

9 months ago

2.0.9

9 months ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago