Skip to content

Commit

Permalink
fix(button): add elementType to 'as' property type check (#4893)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Soares committed Dec 17, 2019
1 parent 610f69a commit 47a52dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react/src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ Button.propTypes = {
* Specify how the button itself should be rendered.
* Make sure to apply all props to the root node and render children appropriately
*/
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
as: PropTypes.oneOfType([
PropTypes.func,
PropTypes.string,
PropTypes.elementType,
]),

/**
* Specify an optional className to be added to your Button
Expand Down

0 comments on commit 47a52dd

Please sign in to comment.