Preact Component that Displays a User's GitHub Contribution Calendar
npm install preact-github-calendarpreact-github-calendar is a small (1.3kb brotli) component library used for displaying a user's contribution calendar from GitHub. This component comes with customization options that you can use for making the component better adhere to the style of your application. Requests for additional customization options are always welcome.
Try out the demo!
```
$ yarn add preact-github-calendar
`jsx
import GitHubCalendar from 'preact-github-calendar';
import 'preact-github-calendar/style.css';
export default function App() {
return
}
`
All options are entirely optional, no need to provide the options prop if you have no wish to customize anything. These only override the defaults; if you like the display, no need to change anything!
Type: number2
Default:
Sets the margin to be used between the blocks in the component. This affects both the vertical and horizontal margins.
Type: number12
Default:
Sets the size of the blocks in the component. This affects both the vertical and horizontal dimensions.
Type: ['['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39']
Default:
Changes the color spread in the calendar. The first item in the array replaces the color for least commits, and the last item replaces the color for most commits. Like the labelColor option, keywords, RGB(A) and HSL(A) values are all supported as valid colors. Default is GitHub's color scheme.
Type: number14
Default:
Changes the font size of the month and days of the week labels.
Type: booleantrue
Default:
Show a tooltip when hovering over calendar elements. Shows the number of contributions and the date for the element.
Type: booleanfalse`
Default:
Add the week day labels to the left axis of the graph.
MIT © Ryan Christian