Skip to content

Commit 00acbe1

Browse files
committed
[add] styles scroll and message styl
1 parent 4b54286 commit 00acbe1

File tree

4 files changed

+41
-11
lines changed

4 files changed

+41
-11
lines changed

src/client/Components/Discussions.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,20 @@ export default class Discussions extends React.Component {
5050
this.state.messages.push( message );
5151
let MessageGlobal = this.state.messages;
5252
this.setState({ messages: MessageGlobal });
53-
53+
5454
contMessage.scrollTop = contMessage.scrollHeight;
5555
}
5656

5757
render(){
5858
return <section className="conversationBody">
59-
<div className="header-user">
59+
<header className="header-user">
60+
<figure className="logo">
61+
<img src="images/logo.png" width="130" height="100" />
62+
</figure>
6063
<figure className="avatar">
61-
<img src={this.props.avatar} width="30" height="30" />
64+
<img src={this.props.avatar} width="40" height="40" />
6265
</figure>
63-
64-
<h2 className="header-user-username">
65-
{ `${this.props.username}` }
66-
</h2>
67-
</div>
68-
66+
</header>
6967

7068
<MessageList
7169
messages={this.state.messages}/>

src/client/Components/MessageList.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default function MessageList (props){
1414
</figure>
1515
<div className="Message-Body">
1616
<div>
17+
<h4>{item.username}</h4>
1718
<p>
1819
{ item.message }
1920
</p>

src/client/stylus/scroll.styl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
::-webkit-scrollbar
2+
3+
width 8px /* for vertical scrollbars */
4+
height 8px /* for horizontal scrollbars */
5+
6+
7+
::-webkit-scrollbar-track
8+
9+
background rgba(0, 0, 0, 0.1)
10+
border-radius 10px
11+
12+
13+
::-webkit-scrollbar-thumb
14+
background rgba(0, 0, 0, 0.2)
15+
border-radius 10px

src/client/stylus/style.styl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
@import 'util'
44
@import 'colours'
55
@import 'formsUI'
6+
@import 'scroll'
67

78
body
89
font-size 16px
910

1011
h1
1112
h2
1213
h3
14+
h4
15+
p
1316
figure
1417
margin 0
1518
padding 0
@@ -34,14 +37,21 @@ figure
3437
width 100%
3538

3639
.header-user
37-
background purpe
40+
align-items center
41+
display flex
42+
flex-direction row
43+
justify-content space-between
3844
padding 1em
3945

46+
> .avatar
47+
> img
48+
border-radius 50%
49+
4050
.ListMessage
4151
box-sizing border-box
4252
display flex
4353
flex-direction column
44-
height calc(100vh - 186.59px)
54+
height calc(100vh - 222.59px)
4555
overflow-y auto
4656
padding 20px
4757
width 100%
@@ -50,6 +60,12 @@ figure
5060
margin-bottom .5em
5161
&-avatar
5262
float left
63+
> img
64+
border-radius 50%
65+
&-Body
66+
margin-left 50px
67+
> p
68+
margin-top 2px
5369

5470
.Message-form
5571
position fixed

0 commit comments

Comments
 (0)