From 804109cfa1d5de2916b009291176097811ddfb6e Mon Sep 17 00:00:00 2001 From: Michael An <1822852997@qq.com> Date: Wed, 24 Apr 2019 11:10:59 +0800 Subject: [PATCH] add search icon --- frontend/src/components/search/search.js | 12 ++++++++++++ frontend/src/css/search.css | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/frontend/src/components/search/search.js b/frontend/src/components/search/search.js index fa6e80b014..8ed4b88da5 100644 --- a/frontend/src/components/search/search.js +++ b/frontend/src/components/search/search.js @@ -222,6 +222,10 @@ class Search extends Component { }); } + onSearchPage = () => { + window.location.href = siteRoot + 'search/' + } + render() { let width = this.state.width !== 'default' ? this.state.width : ''; let style = {'width': width}; @@ -244,6 +248,10 @@ class Search extends Component { onChange={this.onChangeHandler} autoComplete="off" /> + {this.state.isCloseShow && + + } {this.state.isCloseShow && }
@@ -273,6 +281,10 @@ class Search extends Component { onChange={this.onChangeHandler} autoComplete="off" /> + {this.state.isCloseShow && + + } {this.state.isCloseShow && }
diff --git a/frontend/src/css/search.css b/frontend/src/css/search.css index c99ef943c9..8e7f054051 100644 --- a/frontend/src/css/search.css +++ b/frontend/src/css/search.css @@ -24,6 +24,11 @@ font-style: normal; } +.search-icon-arrow { + right: 40px; + left: auto; +} + .search-input { height: 1.875rem; width: 15rem;