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

Commit 4216abf

Browse files
author
Dmitry Yadrikhinsky
committed
Duration icon
1 parent bdc071c commit 4216abf

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

src/App.global.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
display: flex;
99
align-items: center;
1010
}
11+
12+
.flex-1 {
13+
flex: 1
14+
}
15+
16+
@purple: #713A91;

src/components/IconTile/IconTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import cn from '../../helpers/ClassNameHelper';
66
interface IconTileProps {
77
children: React.ReactNode;
88
backgroundColor: string;
9-
className: string;
9+
className?: string;
1010
}
1111

1212
export default function IconTile({

src/screens/Main.less

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
.flex-1 {
2-
flex: 1
3-
}
1+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
.drawer-task {
22
width: 100%;
3+
4+
.duration {
5+
display: flex;
6+
flex-direction: row;
7+
align-items: center;
8+
}
9+
10+
.duration-value {
11+
padding-left: 5px;
12+
}
313
}

src/screens/projects/components/DrawerTask/DrawerTask.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import React, { useMemo } from 'react';
22
import { Checkbox, Drawer, Input, Space } from 'antd';
33
import { observer } from 'mobx-react';
4-
import { FieldTimeOutlined } from '@ant-design/icons';
4+
import { ClockCircleOutlined } from '@ant-design/icons';
55

66
import './DrawerTask.less';
77

88
import TaskModel from '../../../../models/TaskModel';
99
import rootStore from '../../../../services/RootStore';
1010
import { useTaskDuration } from '../../../../hooks/TaskHooks';
1111
import HoursByTask from '../HoursByTask/HoursByTask';
12+
import IconTile from '../../../../components/IconTile/IconTile';
1213

1314
const { projectStore } = rootStore;
1415

@@ -67,9 +68,11 @@ export default observer(function DrawerTask({
6768
}
6869
}}
6970
/>
70-
<div>
71-
<FieldTimeOutlined />
72-
<span>: {duration}</span>
71+
<div className="duration">
72+
<IconTile backgroundColor="#713A91">
73+
<ClockCircleOutlined style={{ color: 'white ' }} />
74+
</IconTile>
75+
<span className="duration-value">{duration}</span>
7376
</div>
7477

7578
<HoursByTask task={task} />

src/screens/projects/components/TaskControl/TaskControl.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import '../../../../App.global';
2+
13
.task-control {
24
display: inline-flex;
35
align-items: center;
@@ -7,7 +9,7 @@
79
border-radius: 5px;
810
line-height: 16px;
911
color: white;
10-
background-color: #713A91;
12+
background-color: @purple;
1113
}
1214

1315
.task-control__info {

0 commit comments

Comments
 (0)