-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignmentItem.tsx
More file actions
47 lines (44 loc) · 1.25 KB
/
AssignmentItem.tsx
File metadata and controls
47 lines (44 loc) · 1.25 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
import type {Assignment} from '@/components/admin/assignments/dummy/types';
import Badge from '../Badge';
interface AssignmentItemProps extends Assignment {
index: number;
isOpen?: boolean;
}
const AssignmentItem = ({
title,
index,
submittedStatus,
isOpen,
}: AssignmentItemProps) => {
return (
<div
className={`w-100% h-[60px] flex items-center px-74 ${
index !== 1 && 'border-t-1 border-[#EEEBFC]'
}`}>
<div
className={`w-141 flex-center items-center justify-start ${
!isOpen && 'opacity-[0.6]'
}`}>
{/* 문제 번호 */}
<span className='w-[31px] py-0.5 flex-center rounded-full border-1 border-purple-stroke text-base text-light-black font-medium'>
{index}
</span>
{/* 문제 제목 */}
<span
className={`whitespace-nowrap text-secondary-black text-base font-normal pl-[30px] cursor-pointer ${
isOpen &&
'hover:text-primary hover:underline hover:underline-offset-4'
}`}>
{title}
</span>
</div>
{isOpen && (
<Badge
variant='submission'
status={submittedStatus || 'NOT_SUBMITTED'}
/>
)}
</div>
);
};
export default AssignmentItem;