projeto-hit/frontend/src/components/ChatEnd/TextArea/index.js

29 lines
513 B
JavaScript

import * as React from 'react';
import TextareaAutosize from '@mui/material/TextareaAutosize';
const MinHeightTextarea = (props) => {
const [value, setValue] = React.useState('');
props.func(value);
const handleChange = (event) => {
setValue(event.target.value);
};
return (
<TextareaAutosize
aria-label="minimum height"
minRows={3}
placeholder={props.hint}
onChange={ handleChange}
style={{ width: 200 }}
/>
);
}
export default MinHeightTextarea;