Skip to content

Commit e6a3aa6

Browse files
committed
<InputWithLabel/> - fix prop-types
1 parent 6ee0baa commit e6a3aa6

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

src/InputWithLabel/InputWithLabel.js

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,50 @@ const getSuffixContainer = suffix =>
2525
class InputWithLabel extends React.Component {
2626
static propTypes = {
2727
/** Applied as data-hook HTML attribute that can be used in the tests */
28-
dataHook: PropTypes.PropTypes.string,
28+
dataHook: PropTypes.string,
2929
/** Array of suffix icons */
30-
suffix: PropTypes.PropTypes.arrayOf(PropTypes.PropTypes.element),
30+
suffix: PropTypes.arrayOf(PropTypes.element),
3131
/** Text of rendered label */
32-
label: PropTypes.PropTypes.string,
32+
label: PropTypes.string,
3333
/** Input value */
34-
value: PropTypes.PropTypes.oneOfType([
35-
PropTypes.PropTypes.string,
36-
PropTypes.PropTypes.number,
37-
]),
34+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
3835
/** Input status - use to display an status indication for the user. for example: 'error', 'warning' or 'loading' */
39-
status: PropTypes.PropTypes.oneOf([
36+
status: PropTypes.oneOf([
4037
Input.StatusError,
4138
Input.StatusWarning,
4239
Input.StatusLoading,
4340
]),
4441
/** The status (error/loading) message to display when hovering the status icon, if not given or empty there will be no tooltip */
45-
statusMessage: PropTypes.PropTypes.node,
42+
statusMessage: PropTypes.node,
4643
/** Standard input onFocus callback */
47-
onFocus: PropTypes.PropTypes.func,
44+
onFocus: PropTypes.func,
4845
/** Standard input onBlur callback */
49-
onBlur: PropTypes.PropTypes.func,
46+
onBlur: PropTypes.func,
5047
/** Standard input onChange callback */
51-
onChange: PropTypes.PropTypes.func,
52-
name: PropTypes.PropTypes.string,
53-
type: PropTypes.PropTypes.string,
54-
ariaLabel: PropTypes.PropTypes.string,
48+
onChange: PropTypes.func,
49+
name: PropTypes.string,
50+
type: PropTypes.string,
51+
ariaLabel: PropTypes.string,
5552
/** Standard React Input autoFocus (focus the element on mount) */
56-
autoFocus: PropTypes.PropTypes.bool,
53+
autoFocus: PropTypes.bool,
5754
/** Sets value of autocomplete attribute (consult the [HTML spec](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete) for possible values */
58-
autocomplete: PropTypes.PropTypes.string,
55+
autocomplete: PropTypes.string,
5956
/** when set to true this component is disabled */
60-
disabled: PropTypes.PropTypes.bool,
57+
disabled: PropTypes.bool,
6158
/** A single CSS class name to be passed to the Input element. */
62-
className: PropTypes.PropTypes.string,
59+
className: PropTypes.string,
6360
/** Input max length */
64-
maxLength: PropTypes.PropTypes.number,
61+
maxLength: PropTypes.number,
6562
/** Placeholder to display */
66-
placeholder: PropTypes.PropTypes.string,
63+
placeholder: PropTypes.string,
6764
/** Use a customized input component instead of the default html input tag */
68-
customInput: PropTypes.PropTypes.elementType
69-
? PropTypes.PropTypes.oneOfType([
70-
PropTypes.PropTypes.func,
71-
PropTypes.PropTypes.node,
72-
PropTypes.PropTypes.elementType,
65+
customInput: PropTypes.elementType
66+
? PropTypes.oneOfType([
67+
PropTypes.func,
68+
PropTypes.node,
69+
PropTypes.elementType,
7370
])
74-
: PropTypes.PropTypes.oneOfType([
75-
PropTypes.PropTypes.func,
76-
PropTypes.PropTypes.node,
77-
]),
71+
: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
7872
};
7973

8074
static defaultProps = {

0 commit comments

Comments
 (0)