From 50a2c3777b07f77b6f391deab4bf95f77fe71ae5 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 19 Apr 2021 14:54:39 +1000 Subject: [PATCH] Improved the look --- web-chat/src/App.tsx | 5 ++++- web-chat/src/MessageInput.tsx | 10 ++++++++-- web-chat/src/Room.tsx | 37 +++++++++++++++++++++-------------- web-chat/src/Send.tsx | 2 +- web-chat/src/index.css | 4 ++++ 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/web-chat/src/App.tsx b/web-chat/src/App.tsx index 2a2d8fad91..430729d6b1 100644 --- a/web-chat/src/App.tsx +++ b/web-chat/src/App.tsx @@ -1,3 +1,4 @@ +import { Paper } from '@material-ui/core'; import React from 'react'; import './App.css'; import Room from './Room'; @@ -39,7 +40,9 @@ class App extends React.Component {
- + + +
diff --git a/web-chat/src/MessageInput.tsx b/web-chat/src/MessageInput.tsx index 39f50b89b9..3858e1ce9e 100644 --- a/web-chat/src/MessageInput.tsx +++ b/web-chat/src/MessageInput.tsx @@ -25,8 +25,14 @@ export default class MessageInput extends React.Component { render() { return ( ); } diff --git a/web-chat/src/Room.tsx b/web-chat/src/Room.tsx index f46b36deef..51fc17127f 100644 --- a/web-chat/src/Room.tsx +++ b/web-chat/src/Room.tsx @@ -1,9 +1,9 @@ import { - Container, + Box, Grid, List, ListItem, - ListItemText + ListItemText, Paper } from '@material-ui/core'; import React from 'react'; import MessageInput from './MessageInput'; @@ -32,27 +32,34 @@ export default class Room extends React.Component { render() { return ( -
- - - - {this.renderLines()} - - - - - - - + + + + + {this.renderLines()} + + + + + + + + + + + -
+ + ); } // TODO: Make it own component renderLines() { const renderedLines = []; + for (const line of this.props.lines) { renderedLines.push( { }; return ( - ); diff --git a/web-chat/src/index.css b/web-chat/src/index.css index a6cbaec0da..16a2e803f3 100644 --- a/web-chat/src/index.css +++ b/web-chat/src/index.css @@ -22,3 +22,7 @@ code { content: ""; display: table; } + +.chat-room{ + margin: 2px; +}