aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/container
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-12-10 13:25:46 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-12-10 13:25:46 +0100
commit9f6a36d1f1a16c1a777a23fcc8c986c45ee0a116 (patch)
treee79ccfcb2d8d07dd18b9fe202c227b350c51a94a /src/client/react/components/container
parentedaa91d05e753e3609c00068f565b88c4ef77e62 (diff)
Add some basic styling
Diffstat (limited to 'src/client/react/components/container')
-rw-r--r--src/client/react/components/container/Search.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/react/components/container/Search.js b/src/client/react/components/container/Search.js
index 2489084..206a6a1 100644
--- a/src/client/react/components/container/Search.js
+++ b/src/client/react/components/container/Search.js
@@ -1,16 +1,23 @@
import { connect } from 'react-redux';
-import { inputChange } from '../../actions/search';
+import { inputChange, focusChange } from '../../actions/search';
import PresentationalSearch from '../presentational/Search';
const mapStateToProps = state => ({
results: state.search.searchResults,
value: state.search.searchInput,
+ hasFocus: state.search.hasFocus,
});
const mapDispatchToProps = dispatch => ({
onInputChange: (event) => {
dispatch(inputChange(event.target.value));
},
+ onFocus: () => {
+ dispatch(focusChange(true));
+ },
+ onBlur: () => {
+ dispatch(focusChange(false));
+ },
});
const Search = connect(