import React from 'react';
import { TypeInfo } from './proptypes';

const OneOf = ({ propType }) => <span>{propType.value.map(({ value }) => value).join(' | ')}</span>;

OneOf.propTypes = {
  propType: TypeInfo.isRequired,
};

export default OneOf;

@@ -71,41 +71,33 @@
 nst 
-OneOf = (%7B propType %7D) =%3E %3Cspan%3E%7B
+joinValues = propType =%3E 
 prop
@@ -148,16 +148,142 @@
 %7C ')
+;%0A%0Aconst OneOf = (%7B propType %7D) =%3E (%0A  %3Cspan%3E%7B%60oneOf $%7BArray.isArray(propType.value) ? joinValues(propType) : propType.value%7D%60
 %7D%3C/span%3E
 ;%0A%0AO
@@ -278,16 +278,18 @@
 %7D%3C/span%3E
+%0A)
 ;%0A%0AOneOf

Add type check to PropType on OneOf