aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/MessageInput.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-08-15 09:56:12 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:55 +0300
commitadf830dfcd1350e104b92a0f088e5664a35b7b15 (patch)
treed3c1537144ba33fdddd975b39f8b8d1bf0057c30 /vnext/src/ui/MessageInput.js
parent30723a1df4688c421ccd8ec7b9d804c0bd3d020a (diff)
jsdoc updates
Diffstat (limited to 'vnext/src/ui/MessageInput.js')
-rw-r--r--vnext/src/ui/MessageInput.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/vnext/src/ui/MessageInput.js b/vnext/src/ui/MessageInput.js
index bc9ddd54..e19136d4 100644
--- a/vnext/src/ui/MessageInput.js
+++ b/vnext/src/ui/MessageInput.js
@@ -26,11 +26,13 @@ function moveCaretToEnd(el) {
* @property {string} text
* @property {import('../api').Message} data
* @property {function} onSend
+ * @property {number} rows
+ * @property {string} children
*/
/**
* MessageInput
- * @param {HTMLTextAreaElement & MessageInputProps} props
+ * @param {React.ReactNode & MessageInputProps} props
*/
export default function MessageInput({ text, data, rows, children, onSend }) {
/**
@@ -98,7 +100,7 @@ export default function MessageInput({ text, data, rows, children, onSend }) {
<div style={commentStyle}>
<textarea onChange={textChanged} onKeyPress={handleCtrlEnter}
ref={textareaRef} style={textInputStyle}
- rows={rows || '1'} placeholder={children} value={body} />
+ rows={rows || 1} placeholder={children} value={body} />
<div style={inputBarStyle}>
<UploadButton inputRef={fileinput} value={attach} onChange={uploadValueChanged} />
<Button onClick={onSubmit}><Icon name="ei-envelope" size="s" />Send</Button>
@@ -108,6 +110,9 @@ export default function MessageInput({ text, data, rows, children, onSend }) {
);
}
+/**
+ * @type {React.CSSProperties}
+ */
const commentStyle = {
display: 'flex',
flexDirection: 'column',
@@ -115,6 +120,9 @@ const commentStyle = {
marginTop: '10px'
};
+/**
+ * @type {React.CSSProperties}
+ */
const inputBarStyle = {
display: 'flex',
alignItems: 'center',
@@ -122,6 +130,9 @@ const inputBarStyle = {
padding: '3px'
};
+/**
+ * @type {React.CSSProperties}
+ */
const textInputStyle = {
overflow: 'hidden',
resize: 'none',