-
Notifications
You must be signed in to change notification settings - Fork 81
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
Expose the Typescript Types 🙏 #230
Comments
Hi @majelbstoat, First, in case In case you wanted to declare a standalone function then you might extract components' prop types like:
More info about accessing React components' props here. |
Hi @majelbstoat, |
any update on this ? |
I went and tried that approach, and it didn't immediately work for me, though I don't exactly recall why right now. It really would be very nice if you could just add an |
I'll consider it as soon as I have time to do so 👍 In the meanwhile I confirm the mentioned approach works in a CodeSandbox repro. |
Might be a bit harder than originally thought: If we can't find a proper TS workaround, we might consider removing component's |
Implemented in v8.4.0. Prop types exposed as: import type { PieChartProps } from 'react-minimal-pie-chart'; |
Do you want to request a feature or report a bug?
request a feature
What is the current behaviour?
Many of the types are not exposed, so if I want to write, for example a strongly typed label function, i believe i have to duplicate the types. e.g.
(This example from 7.3.1, but persists in the newest version too)
What is the expected behaviour?
Please export what is now called LabelRenderProps :)
The text was updated successfully, but these errors were encountered: