Skip to content

Commit e870fec

Browse files
committed
the status color shape of chat item has been changed to circular shape
1 parent 66ce3b8 commit e870fec

3 files changed

Lines changed: 30 additions & 11 deletions

File tree

src/Avatar/Avatar.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
display: flex;
44
justify-content: center;
55
align-items: center;
6-
overflow: hidden;
6+
box-sizing: border-box;
7+
position: relative;
78
}
89

910
.rce-avatar-container .rce-avatar {

src/ChatItem/ChatItem.css

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
display: block;
44
overflow: hidden;
55
min-width: 240px;
6+
position: relative;
7+
}
8+
9+
.rce-container-citem::after {
10+
content: "";
11+
width: 85%;
12+
height: 1px;
13+
background: #f1f1f1;
14+
margin: auto;
15+
position: absolute;
16+
left: 0;
17+
right: 0;
18+
bottom: 0;
19+
}
20+
21+
.rce-container-citem:last-of-type::after {
22+
opacity: 0;
623
}
724

825
.rce-citem {
@@ -23,24 +40,26 @@
2340
}
2441

2542
.rce-citem-avatar {
26-
position: relative;
27-
padding: 0 15px 0 13px;
43+
padding: 0 13px 0 13px;
2844
justify-content: center;
2945
display: flex;
3046
align-items: center;
3147
}
3248

3349
.rce-citem-status {
34-
width: 20px;
35-
height: 20px;
36-
bottom: 10px;
37-
right: 10px;
3850
position: absolute;
39-
border-radius: 100%;
51+
left:0;
52+
right:0;
53+
top: 0;
54+
bottom: 0;
55+
width: 100%;
56+
height: 100%;
57+
background: transparent;
58+
margin: auto;
4059
display: flex;
4160
align-items: center;
4261
justify-content: center;
43-
background: #ccc;
62+
border-radius: 100%;
4463
}
4564

4665
.rce-citem-avatar img {
@@ -64,7 +83,6 @@
6483
display: flex;
6584
justify-content: center;
6685
padding-right: 15px;
67-
border-bottom: 1px solid rgba(0,0,0,.05);
6886
overflow: hidden;
6987
}
7088

src/ChatItem/ChatItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class ChatItem extends Component {
2525
size="large"
2626
sideElement={
2727
this.props.statusColor &&
28-
<span className='rce-citem-status' style={{backgroundColor: this.props.statusColor}}>
28+
<span className='rce-citem-status' style={{boxShadow: `inset 0 0 0 2px ${this.props.statusColor}, inset 0 0 0 5px #FFFFFF`}}>
2929
{this.props.statusText}
3030
</span>
3131
}

0 commit comments

Comments
 (0)