import { checkPropTypes, number } from "prop-types";
const max = (value, proptypes = number) => (props, propName, componentName) => {
  const { [propName]: valueProp } = props;
  checkPropTypes({ [propName]: proptypes }, props, "prop", componentName);
  if (valueProp > value) {
    return new Error(
      `Invalid prop ${propName} supplied to ${componentName}. ${propName} must be a value with maximum of ${value}`
    );
  }
  return null;
};
var max_default = max;
export {
  max_default as default
};
