Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-06-01 05:20:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c8a3cac4fdab86f0a5cbaec71f9a5703698fe964
c8a3cac4
1 parent
fe9c1937
change Message container style
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
front/src/Components/Message.js
front/src/Components/Message.js
View file @
c8a3cac
import
React
from
"react"
;
import
styled
from
"styled-components"
;
import
{
parse
,
format
}
from
"date-fns
"
;
import
ProfileIcon
from
"./ProfileIcon
"
;
const
MessageWrapper
=
styled
.
div
`
display: flex;
justify-content: flex-
end
;
justify-content: flex-
start
;
align-items: center;
padding: 20px 10px;
margin-top: 20px;
...
...
@@ -13,6 +13,11 @@ const MessageWrapper = styled.div`
const
MsgContainer
=
styled
.
div
`
display: flex;
flex-direction: row;
`
;
const
ColumnBox
=
styled
.
div
`
display: flex;
flex-direction: column;
`
;
...
...
@@ -20,9 +25,7 @@ const MsgBox = styled.div`
display: flex;
justify-content: center;
align-items: center;
background-color: #54a0ff;
color: white;
border-radius: 20px;
color: black;
margin-bottom: 10px;
`
;
...
...
@@ -42,16 +45,19 @@ const Time = styled.span`
font-size: 15px;
`
;
export
default
({
text
})
=>
{
export
default
({
text
,
avatar
})
=>
{
return
(
<
MessageWrapper
className
=
"MessageWrapper"
>
<
MsgContainer
>
<
ProfileIcon
avatar
=
{
avatar
}
/
>
<
ColumnBox
>
<
MsgBox
>
<
Msg
>
{
text
}
<
/Msg
>
<
/MsgBox
>
<
TimeBox
>
<
Time
>
<
/Time
>
<
Time
>
1
<
/Time
>
<
/TimeBox
>
<
/ColumnBox
>
<
/MsgContainer
>
<
/MessageWrapper
>
);
...
...
Please
register
or
login
to post a comment