Skip to content
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

XYChart series components do not export Prop types #1221

Open
hellosmithy opened this issue May 21, 2021 · 1 comment
Open

XYChart series components do not export Prop types #1221

hellosmithy opened this issue May 21, 2021 · 1 comment

Comments

@hellosmithy
Copy link

hellosmithy commented May 21, 2021

It's difficult to wrap / extend the XYChart series components in TypeScript because they don't expose explicit exports of their prop types (which are generic).

E.g. https://github.com/airbnb/visx/blob/master/packages/visx-xychart/src/components/series/LineSeries.tsx

It's possible to extract the prop types using something like:
React.ComponentProps<typeof LineSeries> but they lose their generic properties due to the use of typeof.

Since other components do expose their props as exports, can we add the same for the series components?
I'm happy to raise a PR for this change.

@williaster
Copy link
Collaborator

Hey @hellosmithy 👋 , I 100% agree this is a pain point and ideally the types would be exported. I don't have the bandwidth to do this right now but would happily review a PR 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants