1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-15 07:52:14 +00:00

Merge pull request #3363 from haiwen/search-icon

add search icon
This commit is contained in:
Daniel Pan 2019-04-25 17:13:13 +08:00 committed by GitHub
commit 974dda8f15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 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

@ -22,6 +22,12 @@
cursor: pointer;
pointer-events: all;
font-style: normal;
min-width: 25px;
}
.search-icon-arrow {
right: 25px;
left: auto;
}
.search-input {