Skip to content

Commit fa2e6d8

Browse files
Fix props not being generated
1 parent 0a72a2e commit fa2e6d8

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

docs/pages/x/api/charts/heatmap-plot.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
2-
"props": {},
2+
"props": {
3+
"borderRadius": { "type": { "name": "number" } },
4+
"slotProps": { "type": { "name": "object" }, "default": "{}" },
5+
"slots": {
6+
"type": { "name": "object" },
7+
"default": "{}",
8+
"additionalInfo": { "slotsApi": true }
9+
}
10+
},
311
"name": "HeatmapPlot",
412
"imports": [
513
"import { HeatmapPlot } from '@mui/x-charts-pro/Heatmap';",
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"componentDescription": "",
3-
"propDescriptions": {},
3+
"propDescriptions": {
4+
"borderRadius": { "description": "The border radius of the heatmap cells in pixels." },
5+
"slotProps": { "description": "The props used for each component slot." },
6+
"slots": { "description": "Overridable component slots." }
7+
},
48
"classDescriptions": {},
59
"slotDescriptions": { "cell": "The component that renders the heatmap cell." }
610
}
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
'use client';
2+
import * as React from 'react';
3+
import PropTypes from 'prop-types';
24
import { HeatmapSVGPlot } from './HeatmapSVGPlot';
35
import { type HeatmapRendererPlotProps } from './Heatmap.types';
46

57
export interface HeatmapPlotProps extends HeatmapRendererPlotProps {}
68

7-
export function HeatmapPlot({ borderRadius, ...props }: HeatmapPlotProps) {
9+
function HeatmapPlot({ borderRadius, ...props }: HeatmapPlotProps): React.ReactNode {
810
return <HeatmapSVGPlot borderRadius={borderRadius} {...props} />;
911
}
12+
13+
HeatmapPlot.propTypes = {
14+
// ----------------------------- Warning --------------------------------
15+
// | These PropTypes are generated from the TypeScript type definitions |
16+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
17+
// ----------------------------------------------------------------------
18+
/**
19+
* The border radius of the heatmap cells in pixels.
20+
*/
21+
borderRadius: PropTypes.number,
22+
/**
23+
* The props used for each component slot.
24+
* @default {}
25+
*/
26+
slotProps: PropTypes.object,
27+
/**
28+
* Overridable component slots.
29+
* @default {}
30+
*/
31+
slots: PropTypes.object,
32+
} as any;
33+
34+
export { HeatmapPlot };

0 commit comments

Comments
 (0)