i dont even remember tbh, some calendar thing i think

This commit is contained in:
2024-03-07 22:21:31 -05:00
parent d126af05e1
commit ac6e89720f
7 changed files with 335 additions and 42 deletions
+46
View File
@@ -0,0 +1,46 @@
import React from "react";
import { ResponsiveTimeRange } from "@nivo/calendar";
const CalendarSquares = ({ data }: any) => {
const fromDate = new Date();
const toDate = fromDate.getDate() + 30;
return (
<ResponsiveTimeRange
data={data}
// from={fromDate.toLocaleString("en-us")}
// to={toDate.toLocaleDateString("en-us")}
from="2024-03-07"
to="2024-04-11"
emptyColor="#171717"
colors={["#61cdbb", "#97e3d5", "#e8c1a0", "#f47560"]}
margin={{ top: -70 }}
direction="vertical"
square={false}
firstWeekday="thursday"
weekdayTicks={[]}
tooltip={undefined}
// monthLegendOffset={0}
weekdayLegendOffset={0}
dayBorderWidth={1}
dayBorderColor="#ffffff"
// legends={[
// {
// anchor: "bottom-right",
// direction: "row",
// justify: false,
// itemCount: 4,
// itemWidth: 42,
// itemHeight: 36,
// itemsSpacing: 14,
// itemDirection: "right-to-left",
// translateX: -60,
// translateY: -60,
// symbolSize: 20,
// },
// ]}
/>
);
};
export default CalendarSquares;