Skip to content

Commit

Permalink
Allows having JSX elements as an "as" property
Browse files Browse the repository at this point in the history
See Semantic-Org#3138 for the problem described. 
Solves problem when custom links are used
  • Loading branch information
tomitrescak authored Sep 8, 2018
1 parent 4d0688a commit d33ce51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/customPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const typeOf = (...args) => Object.prototype.toString.call(...args)
* Ensure a component can render as a give prop value.
*/
export const as = (...args) =>
PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.symbol])(...args)
PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string, PropTypes.symbol])(...args)

/**
* Ensure a prop is a valid DOM node.
Expand Down

0 comments on commit d33ce51

Please sign in to comment.