-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.jsx
129 lines (128 loc) · 3.05 KB
/
Card.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import { Box, Typography } from "@mui/material";
import Image from "next/image";
import { Draggable } from "react-beautiful-dnd";
export default function Card({ item, index }) {
return (
<Draggable draggableId={item.id.toString()} index={index}>
{(provided) => {
return (
<Box
sx={{
backgroundColor: "white",
p: { md: 2, sm: 1 },
py: 2,
borderRadius: 4,
}}
{...provided.draggableProps}
{...provided.dragHandleProps}
ref={provided.innerRef}
key={index}
>
<Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
<Typography
sx={{
color: "#D58D49",
backgroundColor: "#F9EEE3",
py: 0.5,
px: 1,
borderRadius: 2,
}}
>
{item.priority}
</Typography>
<Image
src="assets/icons/more.svg"
width={15}
height={15}
alt="more"
/>
</Box>
<Box sx={{ display: "flex", justifyContent: "center" }}>
{item.images &&
item.images.length > 0 &&
item.images.map((image) => (
<Box>
<Image src={image} height={200} width={200} alt={image} />
</Box>
))}
</Box>
<Box sx={{ my: 1 }}>
<Typography sx={{ fontSize: 18, fontWeight: 600 }}>
{item.title}
</Typography>
<Typography
sx={{ fontSize: 12, fontWeight: 400, color: "#787486" }}
>
{item.desc}
</Typography>
</Box>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
}}
>
<Box
sx={{
display: "flex",
alignItems: "center",
}}
>
{item.assignees.map((assignee) => (
<Image
src={assignee}
width={24}
height={24}
style={{ marginLeft: -6 }}
alt={assignee}
/>
))}
</Box>
<Box
sx={{
display: "flex",
alignItems: "center",
gap: { md: 2, sm: 0 },
}}
>
<Box sx={{ display: "flex", alignItems: "center" }}>
<Image
src="assets/icons/messagesIcon.svg"
width={16}
height={16}
alt="messagesIcon"
/>
<Typography
sx={{ fontSize: 12, fontWeight: 500, color: "#787486" }}
>
{item.comments} Comments
</Typography>
</Box>
<Box sx={{ display: "flex" }}>
<Image
src="assets/icons/folder-2.svg"
width={16}
height={16}
alt="messagesIcon"
/>
<Typography
sx={{ fontSize: 12, fontWeight: 500, color: "#787486" }}
>
{item.attachment} files
</Typography>
</Box>
</Box>
</Box>
</Box>
);
}}
</Draggable>
);
}