Skip to content

Commit e5bc0db

Browse files
committed
first commit
1 parent 96188bd commit e5bc0db

File tree

6 files changed

+199
-9
lines changed

6 files changed

+199
-9
lines changed

web/package-lock.json

+32-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,57 @@
11
import styles from './TaskItem.module.css';
2-
2+
import PropTypes from 'prop-types';
33
/*
44
Please create the <TaskItem /> component following the design from the Figma file.
55
Please make sure to add styles using CSS Modules.
66
Add the necessary props to the component.
77
*/
88

9-
export function TaskItem(props) {
10-
return <div className={styles.itemWrapper}></div>;
9+
// assigning styling for priorities
10+
export function TaskItem({
11+
title,
12+
priority,
13+
realiseDate,
14+
designers,
15+
projectName,
16+
}) {
17+
const getPriorityClass = () => {
18+
if (priority === 'Low') return `${styles.lowPriority}`;
19+
if (priority === 'Medium') return `${styles.mediumPriority}`;
20+
if (priority === 'High') return `${styles.highPriority}`;
21+
return '';
22+
};
23+
24+
return (
25+
<div className={styles.itemWrapper}>
26+
<div className={`${styles.titleStyle}`}>{title}</div>
27+
<div>
28+
<div className={`${styles.priorityStyle} ${getPriorityClass()}`}>
29+
{priority}
30+
</div>
31+
</div>
32+
<div className={`${styles.dateStyle}`}>
33+
<img
34+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAlUlEQVR4nOWRMQ6DMAxF30QZWIN6QzZWRjrCubhBK3GDFm4RlMqVrOAALWOfFDlx/v+JZNjGy/oZ/8cBPrEO0xjmds9UAE6db8oc9h+caFfmAXgAZRSizaVohjjEyYWXmhs/zCON/u2b0LgDNWkqYASuKcFFagb0wAt4Ap30tGaTzphC6JlYcw4vxwFTymMFzN8EnGIBv75ESzHoS2YAAAAASUVORK5CYII="
35+
alt="sunset"
36+
/>
37+
<div>{realiseDate}</div>
38+
</div>
39+
<div className={`${styles.designersStyle}`}>
40+
<img
41+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAABaElEQVR4nO2Vy0rDQBSGPxQvYG3dCfoIoq60j6H2Lbw+g2sR1KK+h7gUlxJFFDda3eoDKCpWxBsjf0vaycQkTsFFPjgEcv7/5JxkMgM5OTn/lD5gGTgGnhUBsAT0dsDXwihwAXw54hwY8eizJmgUuQRmgEHFLFBT7qxtoqw+ixUJr4CSnf651yi26MFncSKRmcDFnDSBB5/Fk0Tm1bkoSvPowWfxkKBQSZp7Dz6LQCKzcFxUpDny4LNYkKjmWExDwI008x58Fj36VYzwWgunqKiEipxK+1dfJMMq4tpQatL48rVgNpQq8B5TyOQ2Izai33xvwGrcG+gG9iWu6yHTwICiDGwBr9Ic6MH9wGEK3x7QFdXAugS3wLirS2ASuJN2B9jN4FtrT04AH5ogrki4mJnoU5HWZz7VWDixrc42SE419H2z+My1SeOgmCI55VADWXzm1GxS180CySmEGsjie0nhycnJoWN8A4H+uwQ/ulm4AAAAAElFTkSuQmCC"
42+
alt="user-group-man-man--v1"
43+
/>
44+
<div>{designers}</div>
45+
</div>
46+
<div className={`${styles.projectStyle}`}>{projectName}</div>
47+
</div>
48+
);
1149
}
50+
51+
TaskItem.propTypes = {
52+
title: PropTypes.string.isRequired,
53+
priority: PropTypes.string.isRequired,
54+
realiseDate: PropTypes.string.isRequired,
55+
designers: PropTypes.string.isRequired,
56+
projectName: PropTypes.string.isRequired,
57+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.itemWrapper {
2+
background-color: var(--light-blue);
3+
display: flex;
4+
align-items: center;
5+
justify-content: space-around;
6+
width: 100%;
7+
padding-top: 10px;
8+
padding-bottom: 10px;
9+
border-radius: 10px;
10+
}
11+
12+
.itemWrapper > div {
13+
width: 25%;
14+
padding-left: 20px;
15+
}
16+
17+
.titleStyle {
18+
font-weight: bold;
19+
}
20+
21+
.priorityStyle {
22+
text-align: center;
23+
border-radius: 15px;
24+
width: fit-content;
25+
padding: 5px;
26+
}
27+
28+
.lowPriority {
29+
color: white;
30+
background-color: var(--green);
31+
}
32+
33+
.mediumPriority {
34+
color: white;
35+
background-color: var(--orange);
36+
}
37+
38+
.highPriority {
39+
color: white;
40+
background-color: var(--red);
41+
}
42+
43+
.dateStyle {
44+
gap: 5px;
45+
display: flex;
46+
align-items: center;
47+
}
48+
49+
.designersStyle {
50+
gap: 5px;
51+
display: flex;
52+
align-items: center;
53+
}
54+
55+
.projectStyle {
56+
font-weight: bold;
57+
}

web/src/components/domains/task/TaskList/TaskList.jsx

+39-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { TaskItem } from '../TaskItem/TaskItem';
12
import styles from './TaskList.module.css';
23

34
/*
@@ -8,7 +9,43 @@ Create a taskItems array and return a list of <TaskItem /> components.
89

910
export function TaskList() {
1011
// create some task items here and return one task list for each item you have
11-
const taskItems = [];
1212

13-
return <div className={styles.listWrapper}></div>;
13+
const taskItems = [
14+
{
15+
title: 'Re-work UI/UX',
16+
priority: 'Low',
17+
realiseDate: '12/05/2025',
18+
designers: 'Said, Rachael',
19+
projectName: 'Time App',
20+
},
21+
{
22+
title: 'Dark mode toggle',
23+
priority: 'High',
24+
realiseDate: '09/03/2025',
25+
designers: 'Umair, Precious',
26+
projectName: 'ASA Darkmode Feature',
27+
},
28+
{
29+
title: 'Accessibility checks',
30+
priority: 'Medium',
31+
realiseDate: '15/04/2025',
32+
designers: 'Michael, Ricardo',
33+
projectName: 'Time App',
34+
},
35+
{
36+
title: 'Notification integration',
37+
priority: 'High',
38+
realiseDate: '11/03/2025',
39+
designers: 'Ebtesam, Deborah',
40+
projectName: 'Time App',
41+
},
42+
];
43+
44+
return (
45+
<div className={styles.listWrapper}>
46+
{taskItems.map((task) => (
47+
<TaskItem key={task.title} {...task} />
48+
))}
49+
</div>
50+
);
1451
}

0 commit comments

Comments
 (0)