Adding placeholder to search input.

This commit is contained in:
Roland 2022-01-03 16:26:16 -07:00
parent 94f6d2347b
commit e485b8ff0b
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 3 additions and 3 deletions

View file

@ -76,7 +76,7 @@ function Welcome() {
return (
<Container style={{marginTop: '2em'}}>
<SearchInput initValue={searchStr} onSubmit={setSearchStr} size='big'/>
<SearchInput initValue={searchStr} onSubmit={setSearchStr} size='big' placeholder='Search Everywhere...'/>
{body}
</Container>
)

View file

@ -501,7 +501,7 @@ export function ClearButton({onClick, style, label, icon = 'close'}) {
</Button>
}
export function SearchInput({initValue, onSubmit, size}) {
export function SearchInput({initValue, onSubmit, size, placeholder='Search...'}) {
let [value, setValue] = useState(initValue || '');
size = size || 'small';
@ -536,7 +536,7 @@ export function SearchInput({initValue, onSubmit, size}) {
<Form.Group inline style={{marginBottom: '1em'}}>
<Input
type='text'
placeholder='Search...'
placeholder={placeholder}
onChange={(e) => setValue(e.target.value)}
value={value}
size={size}