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-05-31 23:43:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
173af080941539075d068822e2168160802c0844
173af080
1 parent
0665ed0c
rename Message component
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
65 deletions
front/src/Components/SendingMsg.js → front/src/Components/Message.js
front/src/Components/ReceiveMsg.js
front/src/Components/
SendingMsg
.js
→
front/src/Components/
Message
.js
View file @
173af08
import
React
from
"react"
;
import
styled
from
"styled-components"
;
import
{
parse
,
format
}
from
"date-fns"
;
const
OutcomingBox
=
styled
.
div
`
const
MessageWrapper
=
styled
.
div
`
display: flex;
justify-content: flex-end;
align-items: center;
...
...
@@ -43,15 +44,15 @@ const Time = styled.span`
export
default
({
time
,
text
})
=>
{
return
(
<
OutcomingBox
className
=
"OutcomingMsg
"
>
<
MessageWrapper
className
=
"MessageWrapper
"
>
<
MsgContainer
>
<
MsgBox
>
<
Msg
/>
{
text
}
Outcoming
Message
<
Msg
>
{
text
}
Outcoming
Message
<
/Msg
>
<
/MsgBox
>
<
TimeBox
>
<
Time
/>
{
time
}
Monday
00
:
00
<
Time
>
{
format
(
parse
(
time
,
"MM/DD/YYYY hh:mma"
))}
<
/Time
>
<
/TimeBox
>
<
/MsgContainer
>
<
/
OutcomingBox
>
<
/
MessageWrapper
>
);
};
...
...
front/src/Components/ReceiveMsg.js
deleted
100644 → 0
View file @
0665ed0
import
React
from
"react"
;
import
styled
from
"styled-components"
;
import
ImgIconBox
from
"./ProfileIcon"
;
const
IncomingBox
=
styled
.
div
`
display: flex;
flex-direction: row;
width: 100%;
padding: 20px 10px;
margin-top: 20px;
margin-left: 10px;
`
;
const
MsgContainer
=
styled
.
div
`
display: flex;
flex-direction: column;
margin-left: 10px;
`
;
const
MsgBox
=
styled
.
div
`
background-color: #20bf6b;
color: white;
display: flex;
justify-content: center;
align-items: center;
border-radius: 20px;
margin-bottom: 10px;
`
;
const
Msg
=
styled
.
span
`
font-size: 20px;
padding: 20px 10px;
`
;
const
TimeBox
=
styled
.
div
`
display: flex;
justify-content: flex-start;
align-items: center;
opacity: 0.7;
`
;
const
Time
=
styled
.
span
`
font-size: 15px;
`
;
export
default
({
time
,
text
})
=>
{
return
(
<
IncomingBox
className
=
"IncomingMsg"
>
<
ImgIconBox
/>
<
MsgContainer
>
<
MsgBox
>
<
Msg
/>
{
text
}
Incoming
Message
<
/MsgBox
>
<
TimeBox
>
<
Time
/>
{
time
}
Monday
00
:
00
<
/TimeBox
>
<
/MsgContainer
>
<
/IncomingBox
>
);
};
Please
register
or
login
to post a comment