react-github-calendar
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -1,2 +0,2 @@ | ||
import { FunctionComponent } from 'react'; | ||
import React$1 from 'react'; | ||
import { Props as ActivityCalendarProps } from 'react-activity-calendar'; | ||
@@ -46,3 +46,3 @@ | ||
} | ||
declare const GitHubCalendar: FunctionComponent<Props>; | ||
declare const GitHubCalendar: React$1.ForwardRefExoticComponent<Omit<Props, "ref"> & React$1.RefAttributes<HTMLElement>>; | ||
@@ -49,0 +49,0 @@ export { |
@@ -63,3 +63,3 @@ 'use client'; | ||
} | ||
const GitHubCalendar = ({ | ||
const GitHubCalendar = /*#__PURE__*/React.forwardRef(({ | ||
username, | ||
@@ -73,3 +73,3 @@ year = 'last', | ||
...props | ||
}) => { | ||
}, ref) => { | ||
const [data, setData] = React.useState(null); | ||
@@ -105,4 +105,5 @@ const [loading, setLoading] = React.useState(false); | ||
data: transformData(data.contributions, transformFn), | ||
labels: Object.assign({}, defaultLabels, labels), | ||
ref: ref, | ||
theme: theme, | ||
labels: Object.assign({}, defaultLabels, labels), | ||
totalCount: transformFn && transformTotalCount ? undefined : totalCount | ||
@@ -113,5 +114,6 @@ }, props, { | ||
})); | ||
}; | ||
}); | ||
GitHubCalendar.displayName = 'GitHubCalendar'; | ||
exports.default = GitHubCalendar; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "react-github-calendar", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": " React component to display a GitHub contributions calendar", | ||
@@ -23,3 +23,3 @@ "author": "Jonathan Gruber <gruberjonathan@gmail.com>", | ||
"dependencies": { | ||
"react-activity-calendar": "^2.3.0", | ||
"react-activity-calendar": "^2.3.1", | ||
"react-error-boundary": "^4.0.12" | ||
@@ -26,0 +26,0 @@ }, |
Sorry, the diff of this file is not supported yet
18387
153