How to use the @paprika/helpers/lib/customPropTypes.InputValidTypes.ALL function in @paprika/helpers

To help you get started, we’ve selected a few @paprika/helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github acl-services / paprika / packages / Input / src / Input.js View on Github external
import inputStyles from "./Input.styles";

const propTypes = {
  a11yText: PropTypes.string,
  className: PropTypes.string,
  defaultValue: PropTypes.string,
  hasClearButton: PropTypes.bool,
  hasError: PropTypes.bool,
  icon: PropTypes.node,
  inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.instanceOf(Element) })]),
  isDisabled: PropTypes.bool,
  isReadOnly: PropTypes.bool,
  onChange: PropTypes.func.isRequired,
  onClear: PropTypes.func,
  size: PropTypes.oneOf(ShirtSizes.DEFAULT),
  type: PropTypes.oneOf(InputValidTypes.ALL),
  value: PropTypes.string,
};

const defaultProps = {
  a11yText: null,
  className: null,
  defaultValue: null,
  hasClearButton: false,
  hasError: false,
  icon: null,
  inputRef: () => {},
  isDisabled: false,
  isReadOnly: false,
  onClear: () => {},
  size: ShirtSizes.MEDIUM,
  type: "text",