File tree 3 files changed +107
-0
lines changed 3 files changed +107
-0
lines changed Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+
3
+ import SavedSVG from "../../assets/image/saved.svg" ;
4
+ import {
5
+ AdditionalInfos ,
6
+ Container ,
7
+ Icon ,
8
+ Icons ,
9
+ Saved ,
10
+ Title ,
11
+ Unread ,
12
+ } from "./style" ;
13
+
14
+ type Props = {
15
+ content : string ;
16
+ memberURL : string [ ] ;
17
+ date : string ;
18
+ elapsedTime : string ;
19
+ } ;
20
+
21
+ const LastChat = ( { content, memberURL, date, elapsedTime } : Props ) => {
22
+ return (
23
+ < Container >
24
+ < Title > { content } </ Title >
25
+ < Icons >
26
+ { memberURL . map ( ( uri ) => (
27
+ < Icon key = { uri } source = { { uri } } />
28
+ ) ) }
29
+ </ Icons >
30
+ < AdditionalInfos >
31
+ { date } / { elapsedTime }
32
+ </ AdditionalInfos >
33
+ < Unread />
34
+ { /* <SavedSVG /> */ }
35
+ </ Container >
36
+ ) ;
37
+ } ;
38
+
39
+ LastChat . defaultProps = {
40
+ content : "대화 스타일이\n점점 좋아지고 있어요!" ,
41
+ memberURL : [
42
+ "https://avatars.githubusercontent.com/u/19240202?v=4" ,
43
+ "https://avatars.githubusercontent.com/u/20085849?s=88&u=282927c7a3ada57664ace463e42c9ddd6cfbdd0c&v=4" ,
44
+ "https://avatars.githubusercontent.com/u/40158029?s=52&v=4" ,
45
+ ] ,
46
+ date : "2021.01.10" ,
47
+ elapsedTime : "30:00" ,
48
+ } ;
49
+
50
+ export default LastChat ;
Original file line number Diff line number Diff line change
1
+ export { default } from "./LastChat" ;
Original file line number Diff line number Diff line change
1
+ import styled from "styled-components/native" ;
2
+
3
+ import SavedSVG from "../../assets/image/saved.svg" ;
4
+
5
+ export const Container = styled . View `
6
+ width: 100%;
7
+ height: 145px;
8
+ background-color: #f5f4f9;
9
+ border-radius: 10px;
10
+
11
+ margin-bottom: 4%;
12
+ padding: 16px;
13
+ ` ;
14
+
15
+ export const Title = styled . Text `
16
+ font-weight: bold;
17
+ font-size: 14px;
18
+ line-height: 22px;
19
+ margin-bottom: 3.5%;
20
+ ` ;
21
+
22
+ export const Icon = styled . Image `
23
+ width: 35px;
24
+ height: 35px;
25
+ border-radius: 50;
26
+ ` ;
27
+
28
+ export const Icons = styled . View `
29
+ flex-direction: row;
30
+ ` ;
31
+
32
+ export const AdditionalInfos = styled . Text `
33
+ position: absolute;
34
+ left: 16px;
35
+ bottom: 16px;
36
+ font-weight: bold;
37
+ font-size: 14px;
38
+ line-height: 17px;
39
+ color: #8f91a0;
40
+ ` ;
41
+
42
+ export const Saved = styled ( SavedSVG ) `
43
+ position: absolute;
44
+ top: 16px;
45
+ right: 16px;
46
+ ` ;
47
+
48
+ export const Unread = styled . View `
49
+ position: absolute;
50
+ top: 6px;
51
+ left: 6px;
52
+ width: 10px;
53
+ height: 10px;
54
+ background-color: #ef5d5d;
55
+ border-radius: 50;
56
+ ` ;
You can’t perform that action at this time.
0 commit comments