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

fix(button): add elementType to 'as' property type check (#4893) #4895

Merged
merged 4 commits into from
Dec 17, 2019

Conversation

t-soares
Copy link
Contributor

Fixes #4893

This change add elementType as one type allowed on the "as" prop for Button Component.

Changelog

Changed

  • The 'as' property for Button Component now accepts function, string or elementType.

Testing / Reviewing

  • Pass the Link component from react router to the 'as' property of the Button component and verify that the type checks does not print any warning to the browser console.

@t-soares t-soares requested a review from a team as a code owner December 17, 2019 01:34
@ghost ghost requested review from asudoh and dakahn December 17, 2019 01:34
@netlify
Copy link

netlify bot commented Dec 17, 2019

Deploy preview for the-carbon-components ready!

Built with commit 47a52dd

https://deploy-preview-4895--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Dec 17, 2019

Deploy preview for carbon-components-react ready!

Built with commit 47a52dd

https://deploy-preview-4895--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Dec 17, 2019

Deploy preview for carbon-elements failed.

Built with commit 47a52dd

https://app.netlify.com/sites/carbon-elements/deploys/5df830a56a02b5000886c730

@netlify
Copy link

netlify bot commented Dec 17, 2019

Deploy preview for the-carbon-components ready!

Built with commit 03f5e8d

https://deploy-preview-4895--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Dec 17, 2019

Deploy preview for carbon-components-react failed.

Built with commit 03f5e8d

https://app.netlify.com/sites/carbon-components-react/deploys/5df952e11bf3c2000b7a5c12

@netlify
Copy link

netlify bot commented Dec 17, 2019

Deploy preview for carbon-elements ready!

Built with commit 03f5e8d

https://deploy-preview-4895--carbon-elements.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 - Thanks @t-soares!

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

Successfully merging this pull request may close these issues.

Typechecking on "as" prop for Button Component should also expect an elementType
3 participants