export default function valueValidation(props, propName, componentName) {
  let error = singlePropFrom('children', 'value')(props, propName, componentName);

  if (!error) {
    error = React.PropTypes.node(props, propName, componentName);
  }

  return error;
}
Example #2
0
    closeDrawer: (props, propName, component) => {
      removed(props, propName);

      const { PERSISTENT, PERSISTENT_MINI } = NavigationDrawer.DrawerType;
      const { drawerType } = props;
      if(drawerType !== PERSISTENT && drawerType !== PERSISTENT_MINI) {
        return;
      }

      return PropTypes.func.isRequired(props, propName, component)
        || PropTypes.string(props, 'closeIconClassName', component)
        || PropTypes.node(props, 'closeIconChildren', component);
    },
Example #3
0
 navHeaderChildren: (props, propName, component) => {
   deprecate(props, propName, component, 'drawerChildren');
   return PropTypes.node(props, propName, component);
 },
Example #4
0
 navHeader: (props, propName, component) => {
   removed(props, propName);
   return PropTypes.node(props, propName, component);
 },