aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Input.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Input.js')
-rw-r--r--vnext/src/ui/Input.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/vnext/src/ui/Input.js b/vnext/src/ui/Input.js
index c74d595d..e4fdefa0 100644
--- a/vnext/src/ui/Input.js
+++ b/vnext/src/ui/Input.js
@@ -1,17 +1,23 @@
import React from 'react';
-import PropTypes from 'prop-types';
import './Input.css';
+/**
+ * @typedef {Object} InputProps
+ * @property {string} name
+ * @property {string} value
+ * @property {string=} placeholder
+ * @property {React.CSSProperties=} rest
+ */
+
+/**
+ * Input component
+ * @param {InputProps} props
+ */
function Input({ name, value, ...rest }) {
return (
<input className="input" name={name} value={value} {...rest} />
);
}
-Input.propTypes = {
- name: PropTypes.string.isRequired,
- value: PropTypes.string.isRequired
-};
-
export default React.memo(Input);