Remove isBuilding prop from SearchBox
This commit is contained in:
parent
5daf0796d1
commit
6625099c03
@ -173,7 +173,7 @@ class ColouringMap extends Component<any, ColouringMapState> { // TODO: add prop
|
|||||||
<Fragment>
|
<Fragment>
|
||||||
<Legend slug={cat} />
|
<Legend slug={cat} />
|
||||||
<ThemeSwitcher onSubmit={this.themeSwitch} currentTheme={this.state.theme} />
|
<ThemeSwitcher onSubmit={this.themeSwitch} currentTheme={this.state.theme} />
|
||||||
<SearchBox onLocate={this.handleLocate} isBuilding={isBuilding} />
|
<SearchBox onLocate={this.handleLocate} />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
max-width:80%;
|
max-width:80%;
|
||||||
}
|
}
|
||||||
.building.search-box {
|
|
||||||
top: 0.5rem;
|
|
||||||
}
|
|
||||||
.search-box form,
|
.search-box form,
|
||||||
.search-box .search-box-results {
|
.search-box .search-box-results {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -8,8 +8,7 @@ import { SearchIcon } from '../components/icons';
|
|||||||
*/
|
*/
|
||||||
class SearchBox extends Component<any, any> { // TODO: add proper types
|
class SearchBox extends Component<any, any> { // TODO: add proper types
|
||||||
static propTypes = { // TODO: generate propTypes from TS
|
static propTypes = { // TODO: generate propTypes from TS
|
||||||
onLocate: PropTypes.func,
|
onLocate: PropTypes.func
|
||||||
isBuilding: PropTypes.bool
|
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -159,7 +158,7 @@ class SearchBox extends Component<any, any> { // TODO: add proper types
|
|||||||
</ul>
|
</ul>
|
||||||
: null;
|
: null;
|
||||||
return (
|
return (
|
||||||
<div className={`search-box ${this.props.isBuilding? 'building' : ''}`} onKeyDown={this.handleKeyPress}>
|
<div className="search-box" onKeyDown={this.handleKeyPress}>
|
||||||
<form onSubmit={this.search} className="form-inline">
|
<form onSubmit={this.search} className="form-inline">
|
||||||
<div onClick={this.state.smallScreen ? this.expandSearch : null}>
|
<div onClick={this.state.smallScreen ? this.expandSearch : null}>
|
||||||
<SearchIcon/>
|
<SearchIcon/>
|
||||||
|
Loading…
Reference in New Issue
Block a user