Skip to content

Commit

Permalink
feat(customPropTypes): allow to pass Symbol to as (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored and levithomason committed Jan 10, 2018
1 parent e5e6d40 commit 725d9d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/customPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ 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.string,
PropTypes.func,
PropTypes.string,
PropTypes.symbol,
])(...args)


/**
* Similar to PropTypes.oneOf but shows closest matches.
* Word order is ignored allowing `left chevron` to match `chevron left`.
Expand Down

0 comments on commit 725d9d6

Please sign in to comment.