Skip to content

Commit 2777646

Browse files
author
vikasrohit
committed
SearchBar style fix to avoid css override in calling app.
1 parent 46ad980 commit 2777646

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

components/SearchBar/SearchBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class SearchBar extends Component {
139139
})
140140

141141
const results = this.state.loading === true
142-
? <div className="loading"><Loader /></div>
142+
? <div className="loading-suggestions"><Loader /></div>
143143
: <SearchSuggestions recentSearch={ recentList } popularSearch={ popularList } onSuggestionSelect={ this.handleSuggestionSelect } />
144144
return (
145145
<div className={ sbClasses }>

components/SearchBar/SearchBar.scss

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,14 @@ $active-icon-wrap-bg: #888894;
145145
left: 0;
146146
width: 100%;
147147
z-index: 1000;
148-
}
149-
150-
.loading {
151-
background: none;
152-
}
153148

154-
.SearchSuggestions {
149+
.loading-suggestions {
150+
}
155151

156-
strong {
157-
font-weight: 600;
152+
.SearchSuggestions {
153+
strong {
154+
font-weight: 600;
155+
}
158156
}
159157
}
160158
}

components/SearchSuggestions/SearchSuggestions.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SearchSuggestions extends Component {
6363
{ recentList.map(suggestionItem) }
6464
</ul>
6565
{
66-
popularList ? '' : (
66+
popularList.length !== 0 ? '' : (
6767
<a href="javascript:;" className="footer-link transition">
6868
Learn more about the new Search here
6969
</a>
@@ -105,13 +105,13 @@ class SearchSuggestions extends Component {
105105
SearchSuggestions.propTypes = {
106106
onSuggestionSelect : PropTypes.func.isRequired,
107107
recentSearch : PropTypes.array,
108-
popularList : PropTypes.array,
108+
popularSearch : PropTypes.array,
109109
searchTerm : PropTypes.string
110110
}
111111

112112
SearchSuggestions.defaultProps = {
113113
recentSearch : [],
114-
popularList : [],
114+
popularSearch : [],
115115
searchTerm : ''
116116
}
117117

0 commit comments

Comments
 (0)