1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 23:29:49 +00:00

add search icon

This commit is contained in:
Michael An
2019-04-24 11:10:59 +08:00
parent 4a277240f9
commit 804109cfa1
2 changed files with 17 additions and 0 deletions

View File

@@ -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 &&
<i className='search-icon-right input-icon-addon fas fa-external-link-alt search-icon-arrow'
onClick={this.onSearchPage}></i>
}
{this.state.isCloseShow && <i className='search-icon-right input-icon-addon fas fa-times' onClick={this.onCloseHandler}></i>}
</div>
<div className="search-result-container">
@@ -273,6 +281,10 @@ class Search extends Component {
onChange={this.onChangeHandler}
autoComplete="off"
/>
{this.state.isCloseShow &&
<i className='search-icon-right input-icon-addon fas fa-external-link-alt search-icon-arrow'
onClick={this.onSearchPage}></i>
}
{this.state.isCloseShow && <i className='search-icon-right input-icon-addon fas fa-times' onClick={this.onCloseHandler}></i>}
</div>
<div className="search-result-container">

View File

@@ -24,6 +24,11 @@
font-style: normal;
}
.search-icon-arrow {
right: 40px;
left: auto;
}
.search-input {
height: 1.875rem;
width: 15rem;