Scroll text inputs into view, use red labels in text inputs when theres an error, only autocapitalize the name field

This commit is contained in:
Ken-Håvard Lieng 2018-06-03 06:18:03 +02:00
parent f5de115534
commit d2c1297cf7
12 changed files with 204 additions and 137 deletions

View file

@ -1,13 +1,16 @@
import React, { PureComponent } from 'react';
import classnames from 'classnames';
export default class Message extends PureComponent {
handleNickClick = () => this.props.onNickClick(this.props.message.from);
render() {
const { message } = this.props;
const className = message.type
? `message message-${message.type}`
: 'message';
const className = classnames('message', {
[`message-${message.type}`]: message.type
});
const style = {
paddingLeft: `${window.messageIndent + 15}px`,
textIndent: `-${window.messageIndent}px`,