diff --git a/src/components/molecules/MessageInput/MessageInput.js b/src/components/molecules/MessageInput/MessageInput.js index f8f0b81..1c5b6ae 100644 --- a/src/components/molecules/MessageInput/MessageInput.js +++ b/src/components/molecules/MessageInput/MessageInput.js @@ -17,6 +17,7 @@ const MessageInput = ({ onSendMessage = () => null, onChange = () => null, placeholder, + value, }) => { const [disableButton, setDisableButton] = useState(true) @@ -52,6 +53,7 @@ const MessageInput = ({ placeholder={placeholder} onChange={handleChange} onKeyDown={handleKeyDown} + value={value} /> @@ -64,6 +66,7 @@ const MessageInput = ({ MessageInput.propTypes = { id: PropTypes.string, onSendMessage: PropTypes.func, + onSubmit: PropTypes.func, onChange: PropTypes.func, placeholder: PropTypes.string, } diff --git a/src/components/molecules/Textarea/Textarea.js b/src/components/molecules/Textarea/Textarea.js index da77611..1fb7e4f 100644 --- a/src/components/molecules/Textarea/Textarea.js +++ b/src/components/molecules/Textarea/Textarea.js @@ -14,7 +14,7 @@ const StyledTextarea = styled.textarea.withConfig({ shouldForwardProp })` ${styles} ` -const Textarea = ({ id, placeholder, onBlur, onChange, onKeyDown }) => { +const Textarea = ({ id, placeholder, value, onBlur, onChange, onKeyDown }) => { const handleInput = (e) => { const textarea = e.target textarea.style.height = 'auto' @@ -35,6 +35,7 @@ const Textarea = ({ id, placeholder, onBlur, onChange, onKeyDown }) => { onBlur={onBlur} onChange={handleInput} onKeyDown={onKeyDown} + value={value} /> ) }