Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Commit

Permalink
value and onchange shouldn't be required for input: a defaultValue mi…
Browse files Browse the repository at this point in the history
…ght be specified
  • Loading branch information
terebentina committed Oct 14, 2016
1 parent 122c837 commit d5a3c32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/components/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function Input(_ref) {
}

process.env.NODE_ENV !== "production" ? Input.propTypes = {
value: _react.PropTypes.string.isRequired,
value: _react.PropTypes.string,
name: _react.PropTypes.string,
id: _react.PropTypes.string,
type: _react.PropTypes.string,
Expand All @@ -104,7 +104,7 @@ process.env.NODE_ENV !== "production" ? Input.propTypes = {
message: _react.PropTypes.string,
icon: _react.PropTypes.node,
iconPosition: _react.PropTypes.oneOf(['left', 'right']),
onChange: _react.PropTypes.func.isRequired
onChange: _react.PropTypes.func
} : void 0;

exports.default = Input;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Input({ value, name, id, type = 'text', label, placeholder, expanded, k
}

Input.propTypes = {
value: PropTypes.string.isRequired,
value: PropTypes.string,
name: PropTypes.string,
id: PropTypes.string,
type: PropTypes.string,
Expand All @@ -61,7 +61,7 @@ Input.propTypes = {
message: PropTypes.string,
icon: PropTypes.node,
iconPosition: PropTypes.oneOf(['left', 'right']),
onChange: PropTypes.func.isRequired,
onChange: PropTypes.func,
};

export default Input;

0 comments on commit d5a3c32

Please sign in to comment.