mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Change placeholder according InputType
This commit is contained in:
parent
a36c36789d
commit
a16e38eca8
1 changed files with 9 additions and 2 deletions
|
|
@ -69,11 +69,18 @@ export default function ({ currentWindow, inputType, sendMessage }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const placeholder = {
|
||||||
|
char: 'Press any key',
|
||||||
|
line: ' > '
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<input {...inputHandlers[inputType]}
|
<input {...inputHandlers[inputType]}
|
||||||
|
className='inputBox'
|
||||||
ref={inputEl}
|
ref={inputEl}
|
||||||
value={inputText}
|
value={inputText}
|
||||||
autofocus={true}
|
placeholder={placeholder[inputType]}
|
||||||
|
autofocus
|
||||||
onInput={({ target: { value } }) => setInputText(value)}
|
onInput={({ target: { value } }) => setInputText(value)}
|
||||||
type='text' />
|
type='text' />
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue