Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 6ceff19

Browse files
author
Dmitry Yadrikhinsky
committed
Color of cards
1 parent f220166 commit 6ceff19

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/screens/hours/components/HoursCard/HoursCard.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useMemo } from 'react';
1+
import React, { useMemo } from 'react';
22
import { Card } from 'antd';
33
import format from 'date-fns/format';
44
import { observer } from 'mobx-react';
@@ -36,7 +36,13 @@ export default observer(function HoursCard({
3636
: '';
3737

3838
return (
39-
<Card className="hours-card" onClick={() => onClick(taskTime)}>
39+
<Card
40+
className="hours-card"
41+
onClick={() => onClick(taskTime)}
42+
style={
43+
project?.color ? { borderLeft: `4px solid ${project?.color}` } : {}
44+
}
45+
>
4046
<div className="hours-card__info">
4147
<div className="project-title">{project?.title}</div>
4248
<div className="task-title">{task.title}</div>

0 commit comments

Comments
 (0)