diff --git a/src/components/common/SelectInput.js b/src/components/common/SelectInput.js deleted file mode 100644 index 3f595c1..0000000 --- a/src/components/common/SelectInput.js +++ /dev/null @@ -1,49 +0,0 @@ -import React from "react"; -import PropTypes from "prop-types"; - -const SelectInput = ({ - name, - label, - onChange, - defaultOption, - value, - error, - options -}) => { - return ( -
- -
- {/* Note, value is set here rather than on the option - docs: https://facebook.github.io/react/docs/forms.html */} - - {error &&
{error}
} -
-
- ); -}; - -SelectInput.propTypes = { - name: PropTypes.string.isRequired, - label: PropTypes.string.isRequired, - onChange: PropTypes.func.isRequired, - defaultOption: PropTypes.string, - value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - error: PropTypes.string, - options: PropTypes.arrayOf(PropTypes.object) -}; - -export default SelectInput; diff --git a/src/components/common/TextInput.js b/src/components/common/TextInput.js deleted file mode 100644 index 93d50a9..0000000 --- a/src/components/common/TextInput.js +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react"; -import PropTypes from "prop-types"; - -const TextInput = ({ name, label, onChange, placeholder, value, error }) => { - let wrapperClass = "form-group"; - if (error && error.length > 0) { - wrapperClass += " " + "has-error"; - } - - return ( -
- -
- - {error &&
{error}
} -
-
- ); -}; - -TextInput.propTypes = { - name: PropTypes.string.isRequired, - label: PropTypes.string.isRequired, - onChange: PropTypes.func.isRequired, - placeholder: PropTypes.string, - value: PropTypes.string, - error: PropTypes.string -}; - -export default TextInput;