This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,16 @@ class SearchPane extends React.Component {
7777 }
7878
7979 render ( ) {
80+ var inputStyle = styles . input ;
81+ if ( this . props . searchText || this . state . focused ) {
82+ inputStyle = { ...inputStyle , ...styles . highlightedInput } ;
83+ }
8084 return (
8185 < div style = { styles . container } >
8286 < TreeView reload = { this . props . reload } />
8387 < div style = { styles . searchBox } >
8488 < input
85- style = { styles . input }
89+ style = { inputStyle }
8690 ref = { i => this . input = i }
8791 value = { this . props . searchText }
8892 onFocus = { ( ) => this . setState ( { focused : true } ) }
@@ -141,20 +145,27 @@ var styles = {
141145 height : '17px' ,
142146 position : 'absolute' ,
143147 cursor : 'pointer' ,
144- right : '2px ' ,
145- top : '4px ' ,
148+ right : '7px ' ,
149+ top : '8px ' ,
146150 color : 'white' ,
147151 backgroundColor : 'rgb(255, 137, 137)' ,
148152 } ,
149153
150154 input : {
151155 flex : 1 ,
152- fontSize : '14px ' ,
153- padding : '3px 5px' ,
156+ fontSize : '18px ' ,
157+ padding : '5px 10px ' ,
154158 border : 'none' ,
159+ transition : 'border-top-color .2s ease, background-color .2s ease' ,
155160 borderTop : '1px solid #ccc' ,
161+ borderTopColor : '#ccc' ,
156162 outline : 'none' ,
157163 } ,
164+
165+ highlightedInput : {
166+ borderTopColor : 'aqua' ,
167+ backgroundColor : '#EEFFFE' ,
168+ } ,
158169} ;
159170
160171module . exports = Wrapped ;
Original file line number Diff line number Diff line change 1313 height : 500px ;
1414 }
1515 body {
16+ margin : 0 ;
1617 display : flex;
1718 flex-direction : column;
1819 position : absolute;
You can’t perform that action at this time.
0 commit comments