From adf830dfcd1350e104b92a0f088e5664a35b7b15 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 15 Aug 2019 09:56:12 +0300 Subject: jsdoc updates --- vnext/src/ui/SearchBox.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'vnext/src/ui/SearchBox.js') diff --git a/vnext/src/ui/SearchBox.js b/vnext/src/ui/SearchBox.js index 3f0b884b..aab49757 100644 --- a/vnext/src/ui/SearchBox.js +++ b/vnext/src/ui/SearchBox.js @@ -3,9 +3,22 @@ import { withRouter } from 'react-router-dom'; import { useFormState } from 'react-use-form-state'; /** - * @param {{ pathname: string, onSearch: function, history: import('history').History }} props + * @typedef {Object} SearchBoxPropsFields + * @property {string} pathname + * @property {function} onSearch + */ + + /** + * @typedef {import('react-router-dom').RouteComponentProps & SearchBoxPropsFields} SearchBoxProps + */ + +/** + * @param {SearchBoxProps} props */ function SearchBox({ onSearch, history, pathname }) { + /** + * @type {(React.FormEvent)} + */ let onSubmit = (event) => { event.preventDefault(); onSearch(history, pathname, formState.values.search); -- cgit v1.2.3