Update placeholder

This commit is contained in:
Vishnu Mohandas 2021-05-25 15:17:57 +05:30
parent c3d5494b93
commit 6b1d3a744a
2 changed files with 14 additions and 7 deletions

View file

@ -90,11 +90,11 @@ export default function SearchBar(props: Props) {
option.push( option.push(
...searchResults.map( ...searchResults.map(
(searchResult) => (searchResult) =>
({ ({
type: SuggestionType.LOCATION, type: SuggestionType.LOCATION,
value: searchResult.bbox, value: searchResult.bbox,
label: searchResult.placeName, label: searchResult.placeName,
} as Suggestion) } as Suggestion)
) )
); );
return option; return option;
@ -220,6 +220,11 @@ export default function SearchBar(props: Props) {
backgroundColor: '#282828', backgroundColor: '#282828',
color: '#d1d1d1', color: '#d1d1d1',
}), }),
placeholder: (style) => ({
...style,
color: '#686868',
wordSpacing: '2px',
})
}; };
return ( return (
@ -238,7 +243,7 @@ export default function SearchBar(props: Props) {
Control: ControlWithIcon, Control: ControlWithIcon,
}} }}
ref={selectRef} ref={selectRef}
placeholder={constants.SEARCH_HINT} placeholder={constants.SEARCH_HINT()}
loadOptions={getOptions} loadOptions={getOptions}
onChange={filterFiles} onChange={filterFiles}
isClearable isClearable

View file

@ -301,7 +301,9 @@ const englishConstants = {
SHARING_BAD_REQUEST_ERROR: 'sharing album not allowed', SHARING_BAD_REQUEST_ERROR: 'sharing album not allowed',
SHARING_DISABLED_FOR_FREE_ACCOUNTS: 'sharing is disabled for free accounts', SHARING_DISABLED_FOR_FREE_ACCOUNTS: 'sharing is disabled for free accounts',
CREATE_ALBUM_FAILED: 'failed to create album , please try again', CREATE_ALBUM_FAILED: 'failed to create album , please try again',
SEARCH_HINT: 'search your photos', SEARCH_HINT: () => (
<span>New York, April 14, Christmas, ...</span>
),
TERMS_AND_CONDITIONS: () => ( TERMS_AND_CONDITIONS: () => (
<p> <p>
I agree to the{' '} I agree to the{' '}