Fix: Padding on message box.

Allow 20 max rows on message area.
This commit is contained in:
Paul 2021-07-05 21:07:04 +01:00
parent c246c2b77a
commit b8a4ada30c

View file

@ -61,13 +61,18 @@ export type UploadState =
const Base = styled.div` const Base = styled.div`
display: flex; display: flex;
/*padding: 0 12px;*/ align-items: flex-start;
background: var(--message-box); background: var(--message-box);
textarea { textarea {
font-size: 0.875rem; font-size: 0.875rem;
background: transparent; background: transparent;
} }
.textarea {
flex-grow: 1;
padding: 12px 0;
}
`; `;
const Blocked = styled.div` const Blocked = styled.div`
@ -419,11 +424,12 @@ function MessageBox({ channel, draft }: Props) {
/> />
</Action> </Action>
) : undefined} ) : undefined}
<div class="textarea">
<TextAreaAutoSize <TextAreaAutoSize
autoFocus autoFocus
hideBorder hideBorder
maxRows={5} maxRows={20}
padding={14} padding={0}
id="message" id="message"
value={draft ?? ""} value={draft ?? ""}
onKeyUp={onKeyUp} onKeyUp={onKeyUp}
@ -475,6 +481,7 @@ function MessageBox({ channel, draft }: Props) {
onFocus={onFocus} onFocus={onFocus}
onBlur={onBlur} onBlur={onBlur}
/> />
</div>
{isTouchscreenDevice && ( {isTouchscreenDevice && (
<Action> <Action>
<IconButton onClick={send}> <IconButton onClick={send}>