Skip to content

Commit

Permalink
fix(button): add elementType to 'as' property type check (#4893) (#4895)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-soares authored and joshblack committed Jan 6, 2020
1 parent 0aaf60d commit 0144dfe
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 0144dfe

Please sign in to comment.