Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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",