Skip to content

Commit

Permalink
doc: Update README.md (#135)
Browse files Browse the repository at this point in the history
I had a bit of trouble when first using the package, since this issue applies to everyone using nextjs I think it would be wise to include it in the README
  • Loading branch information
KwibooReese authored Nov 29, 2024
1 parent 728d195 commit 9817eaf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ A lightweight calendar heatmap react component built on SVG, customizable versio
# Not dependent on uiw.
npm install @uiw/react-heat-map --save
```
If using Next.js, you will need to use the [`next-remove-imports`](https://www.npmjs.com/package/next-remove-imports) package to avoid errors, see [issue #69](https://github.com/uiwjs/react-heat-map/issues/69).

## Basic Usage

Expand Down Expand Up @@ -315,12 +316,12 @@ export default Demo
| `legendCellSize` | Size of the legend cells, in pixel. Value equal to `0` hide legend. | number | `11` |
| `startDate` | Start date | Date | `new Date()` |
| `endDate` | End date | Date | - |
| `space` | Interval between grid sizes | number | `2` | 
| `monthPlacement` | position of month labels | `'top' | 'bottom'` | `top` | 
| `space` | Interval between grid sizes | number | `2` |
| `monthPlacement` | position of month labels | `'top' | 'bottom'` | `top` |
| `rectProps` | Grid node attribute settings | `React.SVGProps<SVGRectElement>` | `2` |
| `weekLabels` | Week display | string[] | `['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']` | 
| `monthLabels` | Month display | string[] | `['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']` | 
| `panelColors` | Backgroud color of active colors | `Record<number, string>` \| `string[]` | `['var(--rhm-rect, #EBEDF0)','#C6E48B','#7BC96F', '#239A3B', '#196127']` | 
| `weekLabels` | Week display | string[] | `['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']` |
| `monthLabels` | Month display | string[] | `['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']` |
| `panelColors` | Backgroud color of active colors | `Record<number, string>` \| `string[]` | `['var(--rhm-rect, #EBEDF0)','#C6E48B','#7BC96F', '#239A3B', '#196127']` |
| `rectRender` | Single `day` block re-render | `<E = SVGRectElement>(data: E & { key: number }, valueItem: HeatMapValue & { date: string, column: number, row: number, index: number }) => React.ReactElement` | - |
| `legendRender` | Single `legend` block re-render | `(props: React.SVGProps<SVGRectElement>) => React.ReactNode` | - |

Expand Down Expand Up @@ -367,3 +368,4 @@ Made with [github-action-contributors](https://github.com/jaywcjlove/github-acti
## License

Licensed under the MIT License.

0 comments on commit 9817eaf

Please sign in to comment.