Change placeholder according InputType

This commit is contained in:
He4eT 2021-02-28 03:31:04 +05:00
commit a16e38eca8

View file

@ -69,12 +69,19 @@ 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]}
onInput={({ target: {value}}) => setInputText(value)} autofocus
onInput={({ target: { value } }) => setInputText(value)}
type='text' /> type='text' />
) )
} }