import * as React from "react"; // types // import { Data } from "./types/Data"; // import { MonthLabel } from "./types/MonthLabel"; // import { WeekdayLabel } from "./types/WeekdayLabel"; type Data = { date: string; activities: any[]; }; // types // import { Data } from "./types/Data"; // import { MonthLabel } from "./types/MonthLabel"; // import { WeekdayLabel } from "./types/WeekdayLabel"; type MonthKey = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; // types // import { Data } from "./types/Data"; // import { MonthLabel } from "./types/MonthLabel"; // import { WeekdayLabel } from "./types/WeekdayLabel"; type MonthLabel = Record; // types // import { Data } from "./types/Data"; // import { MonthLabel } from "./types/MonthLabel"; // import { WeekdayLabel } from "./types/WeekdayLabel"; type WeekdayKey = 0 | 1 | 2 | 3 | 4 | 5 | 6; // types // import { Data } from "./types/Data"; // import { MonthLabel } from "./types/MonthLabel"; // import { WeekdayLabel } from "./types/WeekdayLabel"; type WeekdayLabel = Record; // components // types // import { Data } from "./types/Data"; // import { MonthLabel } from "./types/MonthLabel"; // import { WeekdayLabel } from "./types/WeekdayLabel"; // components type ActivityCalendarWidgetProps = { // General props data: Data[]; daysToRender?: number; mode?: "day" | "week" | "month"; // Event Handler clickHandler?: Function; // General props - summary showSummary?: boolean; summaryText?: string; // General props - levels showLevels?: boolean; levelColorMode?: "light" | "dark"; levelColors?: string[]; levelLabelLess?: string; levelLabelMore?: string; // General props - tooltip showTooltip?: boolean; tooltipBgColor?: string; tooltipTextColor?: string; tooltipText?: string; // 'day' specific props weekStart?: WeekdayKey; showWeekdayLabels?: boolean; weekdayLabel?: WeekdayLabel; showMonthLabels?: boolean; monthLabel?: MonthLabel; }; import Days from "./Days/Days"; function ActivityCalendarWidget(props: ActivityCalendarWidgetProps) { return (
{!props.mode || props.mode === "day" ? ( {})} /> ) : null}
); } export default ActivityCalendarWidget;