Skip to content

[Button] Improve types with regard to react-router #15193

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

Merged
merged 2 commits into from
Apr 5, 2019

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Apr 4, 2019

Closes #15171

It already accepted forwardRef components (just added a test with working usage). Used the opportunity to improve types for custom wrapper components for Button.

@eps1lon eps1lon added new feature New feature or request component: button This is the name of the generic UI component, not the React module! typescript labels Apr 4, 2019
);

const MyLink = React.forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {
return <ReactRouterLink innerRef={ref as any} {...props} />;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mui-pr-bot
Copy link

No bundle size changes comparing cc0ac06...ebb908c

Generated by 🚫 dangerJS against ebb908c

@eps1lon eps1lon merged commit 08828d5 into mui:next Apr 5, 2019
@eps1lon eps1lon deleted the fix/ButtonBase/component-type-ref branch May 18, 2019 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module! new feature New feature or request typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants