File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 120
120
background :transparent ;
121
121
transition :color 250ms ;
122
122
123
+ & .icon-cross {
124
+ display :none ;
125
+ }
126
+
123
127
& :hover {
124
128
color :getColor (white );
125
129
}
147
151
margin-right :0.5em ;
148
152
width :400px ;
149
153
}
154
+
155
+ .navigation__search-icon.icon-cross {
156
+ display :block ;
157
+ }
158
+
159
+ .navigation__search-icon.icon-magnifying-glass {
160
+ display :none ;
161
+ }
150
162
}
151
163
}
152
164
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Logo from '../logo/logo';
5
5
import './navigation-style' ;
6
6
import './search-style' ;
7
7
8
+ // TODO: Maybe by updating the routing scheme later on we can avoid hardcoding this?
8
9
let Sections = [
9
10
{
10
11
title : 'Concepts' ,
@@ -30,6 +31,7 @@ let Sections = [
30
31
}
31
32
] ;
32
33
34
+ // TODO: Move back to using state once we can handle algolia on our own
33
35
export default class Navigation extends React . Component {
34
36
render ( ) {
35
37
let { pageUrl, sections } = this . props ;
@@ -67,10 +69,14 @@ export default class Navigation extends React.Component {
67
69
< input
68
70
type = "text"
69
71
className = "navigation__search-input"
70
- placeholder = "Search documentation…" />
72
+ placeholder = "Search documentation…"
73
+ onBlur = { this . _toggleSearch . bind ( this ) } />
71
74
< button
72
75
className = "navigation__search-icon icon-magnifying-glass"
73
76
onClick = { this . _toggleSearch . bind ( this ) } />
77
+ < button
78
+ className = "navigation__search-icon icon-cross"
79
+ onClick = { this . _toggleSearch . bind ( this ) } />
74
80
</ div >
75
81
</ Container >
76
82
You can’t perform that action at this time.
0 commit comments