react-beautiful-heatmap
Version:
A calendar heatmap component built on SVG
20 lines (18 loc) • 1.13 kB
TypeScript
import { IValue } from '../types';
export interface SquareProps {
index: number;
numEmptyDaysAtStart: number;
dateDifferenceInDays: number;
showOutOfRangeDays: boolean;
squareCoordinates: number[];
value: IValue | null;
handleClick: (value: IValue | null) => void;
handleMouseOver: (e: any, value: IValue | null) => void;
handleMouseLeave: (e: any, value: IValue | null) => void;
getTooltipDataAttrsForIndex: (index: number) => any;
getTitleForIndex: (index: number) => string | null | undefined;
getClassNameForIndex: (index: number) => string;
transformDayElement?: (el: JSX.Element, value: IValue | null, index: number) => React.ReactNode;
}
declare const Square: ({ index, numEmptyDaysAtStart, dateDifferenceInDays, showOutOfRangeDays, value, squareCoordinates, handleClick, handleMouseOver, handleMouseLeave, getTooltipDataAttrsForIndex, getTitleForIndex, getClassNameForIndex, transformDayElement, }: SquareProps) => string | number | boolean | Iterable<import('react').ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
export default Square;