Skip to content

Commit 040543c

Browse files
authored
Merge pull request #1291 from shakti97/redundant-search-button
fix redundant search button issue
2 parents 12433ae + 3122fd7 commit 040543c

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

client/modules/IDE/components/Searchbar/Searchbar.jsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ class Searchbar extends React.Component {
4444
const { searchValue } = this.state;
4545
return (
4646
<div className={`searchbar ${searchValue === '' ? 'searchbar--is-empty' : ''}`}>
47-
<button
48-
type="submit"
49-
className="searchbar__button"
50-
onClick={this.handleSearchEnter}
51-
>
47+
<div className="searchbar__button">
5248
<InlineSVG className="searchbar__icon" src={searchIcon} />
53-
</button>
49+
</div>
5450
<input
5551
className="searchbar__input"
5652
type="text"

client/styles/components/_searchbar.scss

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,20 @@
1515
}
1616
}
1717

18-
button[type="submit"].searchbar__button {
18+
div.searchbar__button {
1919
background-color: unset;
2020
width: #{31 / $base-font-size}rem;
2121
height: #{36 / $base-font-size}rem;
2222
position: absolute;
23+
display: flex;
24+
justify-content: center;
25+
align-items: center;
2326
padding: 0;
2427
border: 0;
2528
border-right: solid 1px;
2629
@include themify() {
2730
border-right-color: getThemifyVariable('input-border-color');
2831
}
29-
&:enabled:hover {
30-
background-color: unset;
31-
@include themify() {
32-
border-right-color: getThemifyVariable('input-border-color');
33-
}
34-
& g {
35-
fill: unset;
36-
}
37-
}
3832
}
3933

4034
.searchbar__icon {
@@ -43,6 +37,7 @@ button[type="submit"].searchbar__button {
4337
width: #{22 / $base-font-size}rem;
4438
height: #{27 / $base-font-size}rem;
4539
transform: scaleX(-1);
40+
padding-top: #{3 / $base-font-size}rem;
4641
@include themify() {
4742
fill: getThemifyVariable('input-text-color');
4843
}

0 commit comments

Comments
 (0)