0.5.10 • Published 2 years ago

preact-github-calendar v0.5.10

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

preact-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!

Install

$ yarn add preact-github-calendar

Usage

import GitHubCalendar from 'preact-github-calendar';
import 'preact-github-calendar/style.css';

export default function App() {
    return <GitHubCalendar username="rschristian" />;
}

API

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!

blockMargin

Type: number Default: 2

Sets the margin to be used between the blocks in the component. This affects both the vertical and horizontal margins.

blockSize

Type: number Default: 12

Sets the size of the blocks in the component. This affects both the vertical and horizontal dimensions.

contributionColorArray

Type: ['<color>', '<color>', '<color>', '<color>', '<color>'] Default: ['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39']

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.

labelFontSize

Type: number Default: 14

Changes the font size of the month and days of the week labels.

showTooltip

Type: boolean Default: true

Show a tooltip when hovering over calendar elements. Shows the number of contributions and the date for the element.

showWeekdaysLabels

Type: boolean Default: false

Add the week day labels to the left axis of the graph.

License

MIT © Ryan Christian

0.5.10

2 years ago

0.5.9

2 years ago

0.5.8

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.7

4 years ago

0.2.8

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago