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