Skip to content

Commit

Permalink
feat: Implement arrayOf for prop list
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 8, 2020
1 parent 5a7c884 commit 68f1944
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/PropList.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ const PropTypeInfo = ({ type }) => {
params={type.meta.params}
/>
);
case 'arrayOf': {
const { itemTypes } = type.meta;

return itemTypes.raw === 'oneOf' ? (
<div className={styles.listLike}>
<div>{'<Array of'}</div>
<div className={styles.arg}>
<PropTypeInfo type={itemTypes} />
</div>
<div>{'>'}</div>
</div>
) : null;
}
case 'oneOf':
return (
<div className={styles.listLike}>
Expand Down

0 comments on commit 68f1944

Please sign in to comment.