-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathAssignment.jsx
More file actions
49 lines (46 loc) · 1.39 KB
/
Assignment.jsx
File metadata and controls
49 lines (46 loc) · 1.39 KB
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
const Assignment = ({ number, heading, problem, link, status, onUpdate }) => {
const updateCheckboxHandler = () => {
onUpdate(number);
};
return (
<div className="p-4 ">
<div className="font-bold text-xl md:text-2xl flex flex-row items-start md:items-end justify-between space-x-3 rounded bg-[#0c0f0a] p-3">
<div className="flex flex-row ">
<span className="text-2xl text-[#687eff] font-bold mx-1 ">
{number}
</span>
<h1 className="text-white uppercase text-md md:text-2xl">
{" "}
{heading}{" "}
</h1>
{link && (
<div>
<a
href={link}
className="text-[#687eff] text-sm uppercase font-bold mx-3"
target="_blank"
rel="noreferrer"
>
PREVIEW LINK
</a>
</div>
)}
</div>
<div>
<input
type="checkbox"
value={status}
id={`status ${number}`}
onChange={updateCheckboxHandler}
checked={status}
className="h-5 w-5 text-red-400 p-2 cursor-pointer"
/>
</div>
</div>
<div className="bg-[#252422] px-3 py-5 rounded">
<p className="text-md text-[#767676]">{problem}</p>
</div>
</div>
);
};
export default Assignment;