From a16e38eca8c984720612651f29dcd0ac39128ed5 Mon Sep 17 00:00:00 2001 From: He4eT Date: Sun, 28 Feb 2021 03:31:04 +0500 Subject: [PATCH] Change placeholder according InputType --- src/components/player/InputBox.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/player/InputBox.jsx b/src/components/player/InputBox.jsx index 9d860f8..c100c27 100644 --- a/src/components/player/InputBox.jsx +++ b/src/components/player/InputBox.jsx @@ -69,12 +69,19 @@ export default function ({ currentWindow, inputType, sendMessage }) { } } + const placeholder = { + char: 'Press any key', + line: ' > ' + } + return ( setInputText(value)} + placeholder={placeholder[inputType]} + autofocus + onInput={({ target: { value } }) => setInputText(value)} type='text' /> ) }