Skip to content

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

Merged
eps1lon merged 2 commits intomui:nextfrom
eps1lon:fix/ButtonBase/component-type-ref
Apr 5, 2019
Merged

[Button] Improve types with regard to react-router#15193
eps1lon merged 2 commits intomui:nextfrom
eps1lon:fix/ButtonBase/component-type-ref

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 type: new feature Expand the scope of the product to solve a new problem. scope: button Changes related to the button. 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

scope: button Changes related to the button. type: new feature Expand the scope of the product to solve a new problem. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants