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 1/2] 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;
From 0e1b95617e2a9fa66d6e80e07474ea6a9bd62f14 Mon Sep 17 00:00:00 2001
From: Michael An <1822852997@qq.com>
Date: Thu, 25 Apr 2019 17:08:55 +0800
Subject: [PATCH 2/2] update
---
frontend/src/css/search.css | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/frontend/src/css/search.css b/frontend/src/css/search.css
index 8e7f054051..6ed899ffa5 100644
--- a/frontend/src/css/search.css
+++ b/frontend/src/css/search.css
@@ -22,10 +22,11 @@
cursor: pointer;
pointer-events: all;
font-style: normal;
+ min-width: 25px;
}
.search-icon-arrow {
- right: 40px;
+ right: 25px;
left: auto;
}