mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Adding placeholder to search input.
This commit is contained in:
parent
94f6d2347b
commit
e485b8ff0b
2 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue