mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-24 15:18:19 +00:00
committed by
Nicolas Gallagher
parent
0c08ba3a7d
commit
421cb095f7
@@ -9,13 +9,13 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import Picker from './';
|
||||
import PickerItem from './PickerItem';
|
||||
|
||||
const PickerItemPropType = (props: Object, propName: string, componentName: string) => {
|
||||
const prop = props[propName];
|
||||
let error = null;
|
||||
React.Children.forEach(prop, function(child) {
|
||||
if (child.type !== Picker.Item) {
|
||||
if (child.type !== PickerItem) {
|
||||
error = new Error('`Picker` children must be of type `Picker.Item`.');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user