-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[charts] Remove outdated prop-types #10998
[charts] Remove outdated prop-types #10998
Conversation
Deploy preview: https://deploy-preview-10998--material-ui-x.netlify.app/ |
The default exports aren't the only exports in the changed files, there are named and type exports as well, here is the diff patch you could apply that fixes the issues: diff --git a/packages/x-charts/src/PieChart/PieArcLabelPlot.tsx b/packages/x-charts/src/PieChart/PieArcLabelPlot.tsx
index af9460b98..2e5b903ab 100644
--- a/packages/x-charts/src/PieChart/PieArcLabelPlot.tsx
+++ b/packages/x-charts/src/PieChart/PieArcLabelPlot.tsx
@@ -11,7 +11,7 @@ import {
ValueWithHighlight,
useTransformData,
} from './dataTransform/useTransformData';
-import PieArcLabel, { PieArcLabelProps } from './PieArcLabel';
+import { PieArcLabel, PieArcLabelProps } from './PieArcLabel';
import { DefaultizedProps } from '../models/helpers';
const RATIO = 180 / Math.PI;
diff --git a/packages/x-charts/src/PieChart/PieArcPlot.tsx b/packages/x-charts/src/PieChart/PieArcPlot.tsx
index d4565ef4d..b74d4efed 100644
--- a/packages/x-charts/src/PieChart/PieArcPlot.tsx
+++ b/packages/x-charts/src/PieChart/PieArcPlot.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useTransition } from '@react-spring/web';
-import PieArc, { PieArcProps } from './PieArc';
+import { PieArc, PieArcProps } from './PieArc';
import {
DefaultizedPieSeriesType,
DefaultizedPieValueType,
diff --git a/packages/x-charts/src/PieChart/index.tsx b/packages/x-charts/src/PieChart/index.tsx
index 9c0799db3..2eb39ce13 100644
--- a/packages/x-charts/src/PieChart/index.tsx
+++ b/packages/x-charts/src/PieChart/index.tsx
@@ -1,4 +1,18 @@
export { PiePlot } from './PiePlot';
export { PieChart } from './PieChart';
-export { PieArcLabel } from './PieArcLabel';
-export { PieArc } from './PieArc';
+export {
+ PieArcLabel,
+ type PieArcLabelClassKey,
+ type PieArcLabelClasses,
+ type PieArcLabelProps,
+ getPieArcLabelUtilityClass,
+ pieArcLabelClasses,
+} from './PieArcLabel';
+export {
+ PieArc,
+ type PieArcClassKey,
+ type PieArcClasses,
+ type PieArcProps,
+ getPieArcUtilityClass,
+ pieArcClasses,
+} from './PieArc'; Confirmed by running |
export { PieArcLabel, getPieArcLabelUtilityClass, pieArcLabelClasses } from './PieArcLabel'; | ||
export type { PieArcLabelClassKey, PieArcLabelClasses, PieArcLabelProps } from './PieArcLabel'; | ||
export { PieArc, getPieArcUtilityClass, pieArcClasses } from './PieArc'; | ||
export type { PieArcClassKey, PieArcClasses, PieArcProps } from './PieArc'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing that to avoid breaking change, but not sure it's worth exporting them. For example, BarElements are not exported.
When doing cherry pick I would just remove the export
Fixes #10989
The current fix ignores proptypes generated by react-spring. Maybe we could find a better solution. Did not went to far into props generation scripts