Skip to content

Commit 6ca4011

Browse files
committed
css basic
1 parent 2cf811f commit 6ca4011

6 files changed

Lines changed: 12 additions & 46 deletions

File tree

client/src/App.css

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,8 @@
11
.App {
2-
text-align: center;
3-
}
4-
5-
.App-logo {
6-
height: 4vmin;
7-
pointer-events: none;
8-
}
9-
10-
@media (prefers-reduced-motion: no-preference) {
11-
.App-logo {
12-
animation: App-logo-spin infinite 20s linear;
13-
}
14-
}
15-
16-
.App-header {
17-
background-color: #282c34;
18-
min-height: 10vh;
19-
display: flex;
20-
flex-direction: column;
21-
align-items: center;
22-
justify-content: center;
23-
font-size: calc(10px + 2vmin);
24-
color: white;
2+
text-align: left;
3+
padding: 10pt;
254
}
265

276
.App-link {
287
color: #61dafb;
298
}
30-
31-
@keyframes App-logo-spin {
32-
from {
33-
transform: rotate(0deg);
34-
}
35-
to {
36-
transform: rotate(360deg);
37-
}
38-
}

client/src/App.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import React from "react";
2-
import logo from "./logo.svg";
32
import "./App.css";
43
import { ChatList, ChatForm } from "./components";
54

65
function App() {
76
return (
87
<div className="App">
9-
<header className="App-header">
10-
<img src={logo} className="App-logo" alt="logo" />
11-
</header>
128
<ChatList channelId={1} />
139
<ChatForm channelId={1} />
1410
</div>

client/src/components/ChatList.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.chatlist {
2+
list-style-type: none;
3+
padding: 0pt;
4+
}

client/src/components/ChatList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component } from "react";
22
import { ChatMessage } from "../lib/types";
33
import { ChatRow } from "./";
4+
import "./ChatList.css";
45

56
interface ChatListState {
67
messages: ChatMessage[];
@@ -34,7 +35,7 @@ class ChatList extends Component<ChatListProps, ChatListState> {
3435
return <ChatRow key={row.id} message={row} />;
3536
});
3637

37-
return <ul>{list}</ul>;
38+
return <ul className="chatlist">{list}</ul>;
3839
}
3940
}
4041
export default ChatList;

client/src/components/ChatRow.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ interface ChatRowProps {
88
const ChatRow = ({ message }: ChatRowProps) => {
99
return (
1010
<li>
11-
{message.createdDate && new Date(message.createdDate).toLocaleString()}
12-
{message.message}
11+
<small>
12+
{message.createdDate && new Date(message.createdDate).toLocaleString()}
13+
</small>
14+
<p>{message.message}</p>
1315
</li>
1416
);
1517
};

client/src/logo.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)