Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 4ed698a

Browse files
committed
Merge pull request #141 from jaredly/search-bar-style
highlight the search bar when active, and make the font bigger. re #120
2 parents 89e6d32 + 7d790eb commit 4ed698a

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

frontend/SearchPane.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff 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

160171
module.exports = Wrapped;

shells/plain/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
height: 500px;
1414
}
1515
body {
16+
margin: 0;
1617
display: flex;
1718
flex-direction: column;
1819
position: absolute;

0 commit comments

Comments
 (0)