Skip to content

Version 5

Latest

Choose a tag to compare

@grubersjoe grubersjoe released this 16 Nov 18:10
· 73 commits to main since this release

Version 5 of React GitHub Calendar introduces several breaking changes and a introduces a new approach to tooltips. Because this component supports all props of the underlying calendar component React Activity Calendar, all breaking changes from React Activity Calendar v3 also apply here.

Breaking changes

  • React GitHub Calendar is now a pure ESM package.
  • The default export has been removed. Use the named export instead:
    import { GitHubCalendar } from 'react-github-calendar'
  • The eventHandlers prop has been removed. Use the renderBlock prop with React.cloneElement() to attach
    event handlers
  • The totalCount prop has been removed, overriding the total count is no longer supported.
  • The transformTotalCount prop has been removed, overriding the total count is no longer supported.
  • The hideColorLegend prop has been renamed to showColorLegend.
  • The hideMonthLabels prop has been renamed to showMonthLabels.
  • The hideTotalCount prop has been renamed to showTotalCount.

Tooltips

Tooltips no longer depend on external libraries and are now integrated directly into the calendar package. Thanks to code-splitting, tooltips only affect your bundle size when you use them. They are implemented using the Floating UI library as a “headless” component, meaning they come without predefined styles. This gives you full control over the appearance:

  • Import the default styles provided by React Activity Calendar, or
  • Add your own custom CSS.

See the tooltips documentation of the calendar component for details and examples.