@riishabh/react-calender-heatmap 1.0.3 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -17
  2. package/package.json +1 -2
package/README.md CHANGED
@@ -9,29 +9,26 @@ The `TileChart` is a React component that displays data in a tile format, where
9
9
  - `onTileHover`: A callback function that is called when a tile is hovered over. It receives the date and status of the hovered tile.
10
10
  - `tileText`: A string that is displayed on each tile.
11
11
 
12
- ## Demo
13
-
14
- You can see a live demo of the `TileChart` component [here](https://react-calendar-heatmap.vercel.app/).
15
-
16
12
  ## Usage
17
13
 
18
14
  ```tsx
15
+ import TileChart from './TileChart';
19
16
 
20
- import { TileChart } from "@riishabh/react-calender-heatmap";
21
-
22
-
23
- function App() {
24
-
25
- const dummydata = [
26
- { date: "2022-01-01", status: "success" as const },
27
- { date: "2022-01-02", status: "warning" as const },
28
- { date: "2022-01-03", status: "alert" as const },
17
+ const data = [
18
+ { date: '2022-01-01T00:00:00.000Z', status: 'success' },
19
+ { date: '2022-01-02T00:00:00.000Z', status: 'warning' },
20
+ // More data...
29
21
  ];
30
22
 
31
-
32
- return (
33
- <TileChart data={dummydata} range={6} />
23
+ function App() {
24
+ return (
25
+ <TileChart
26
+ data={data}
27
+ range={6}
28
+ onTileHover={(date, status) => console.log(date, status)}
29
+ tileText="Day"
30
+ />
34
31
  );
35
32
  }
36
33
 
37
- export default App;
34
+ export default App;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riishabh/react-calender-heatmap",
3
- "version": "1.0.3",
3
+ "version": "2.0.2",
4
4
  "author": "Rishabh Sharma",
5
5
  "description": "A simple and customizable React calendar heatmap component",
6
6
  "license": "MIT",
@@ -15,7 +15,6 @@
15
15
  "storybook": "storybook dev -p 6006",
16
16
  "build-storybook": "storybook build"
17
17
  },
18
- "homepage": "https://react-calendar-heatmap.vercel.app/",
19
18
  "main": "dist/cjs/index.js",
20
19
  "module": "dist/esm/index.js",
21
20
  "types": "dist/index.d.ts",