mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Merge pull request #21369 from 9renpoto/master
Added react-calendar-heatmap
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
// Type definitions for react-calendar-heatmap 1.6
|
||||
// Project: https://github.com/patientslikeme/react-calendar-heatmap
|
||||
// Definitions by: Keisuke Kan <https://github.com/9renpoto>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
export interface Props {
|
||||
classForValue?: (value: any) => any;
|
||||
endDate?: string | number | Date;
|
||||
gutterSize?: number;
|
||||
horizontal?: boolean;
|
||||
monthLabels?: string[];
|
||||
numDays?: number;
|
||||
onClick?: (value: any) => void;
|
||||
onMouseLeave?: (e: any, value: any) => void;
|
||||
onMouseOver?: (e: any, value: any) => void;
|
||||
showMonthLabels?: boolean;
|
||||
showOutOfRangeDays?: boolean;
|
||||
showWeekdayLabels?: boolean;
|
||||
startDate?: string | number | Date;
|
||||
titleForValue?: (value: any) => any;
|
||||
tooltipDataAttrs?: object;
|
||||
transformDayElement?: (rect: any, value: any, index: number) => any;
|
||||
values: any[];
|
||||
weekdayLabels?: string[];
|
||||
}
|
||||
|
||||
export default class ReactCalendarHeatmap extends React.Component<Props> {}
|
||||
@@ -0,0 +1,16 @@
|
||||
import * as React from 'react';
|
||||
import CalendarHeatmap from 'react-calendar-heatmap';
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
<CalendarHeatmap
|
||||
endDate={new Date('2016-04-01')}
|
||||
numDays={100}
|
||||
values={[
|
||||
{date: '2016-01-01'},
|
||||
{date: '2016-01-22'},
|
||||
{date: '2016-01-30'}
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-calendar-heatmap-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user