Skip to content

Commit

Permalink
change country to optional prop, add searchHint prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Houlihan committed Jun 20, 2019
1 parent 7dd0c3e commit 252dcac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/Components/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class SearchBox extends React.Component {
value={query}
handleFocus={this.handleFocus}
handleBlur={this.handleBlur}
searchHint={this.props.searchHint}
handleInputChange={this.handleInputChange}
/>
<Suggestions
Expand Down Expand Up @@ -179,14 +180,19 @@ SearchBox.propTypes = {
/**
* color of currently selected suggestion
*/
selectColor: PropTypes.string,

selectColor: PropTypes.string
/**
* hint text for input
*/
searchHint: PropTypes.string
};

SearchBox.defaultProps = {
country: undefined,
selectColor: "#58a",
callback: undefined
callback: undefined,
searchHint: "Search"
};

export default SearchBox;
5 changes: 3 additions & 2 deletions src/Components/SearchInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const SearchInput = ({
handleInputChange,
hasResults,
handleFocus,
handleBlur
handleBlur,
searchHint
}) => (
<Wrapper>
<FaSearch />
Expand All @@ -32,7 +33,7 @@ const SearchInput = ({
hasResults={hasResults}
onFocus={handleFocus}
onBlur={handleBlur}
placeholder="Search"
placeholder={searchHint}
value={value}
onChange={handleInputChange}
/>
Expand Down

0 comments on commit 252dcac

Please sign in to comment.