diff --git a/client/modules/IDE/components/Searchbar.jsx b/client/modules/IDE/components/Searchbar.jsx index 771bdf82..02de9e1b 100644 --- a/client/modules/IDE/components/Searchbar.jsx +++ b/client/modules/IDE/components/Searchbar.jsx @@ -8,7 +8,7 @@ import * as SortingActions from '../actions/sorting'; const searchIcon = require('../../../images/magnifyingglass.svg'); -class Searchbar extends React.Component { +export class Searchbar extends React.Component { constructor(props) { super(props); this.state = { @@ -58,7 +58,7 @@ class Searchbar extends React.Component { className="searchbar__input" type="text" value={searchValue} - placeholder="Search sketches..." + placeholder={this.props.searchLabel} onChange={this.handleSearchChange} onKeyUp={this.handleSearchEnter} /> @@ -75,9 +75,15 @@ class Searchbar extends React.Component { Searchbar.propTypes = { searchTerm: PropTypes.string.isRequired, setSearchTerm: PropTypes.func.isRequired, - resetSearchTerm: PropTypes.func.isRequired + resetSearchTerm: PropTypes.func.isRequired, + searchLabel: PropTypes.string, }; +Searchbar.defaultProps = { + searchLabel: 'Search sketches...', +}; + + function mapStateToProps(state) { return { searchTerm: state.search.searchTerm