-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feat/taskCard
# Conflicts: # src/assets/icons/index.ts
- Loading branch information
Showing
9 changed files
with
657 additions
and
5 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
src/components/AnaliticsString/AnaliticsString.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@use '../../globalStyles/variables.scss' as v; | ||
@use '../../globalStyles/mixins.scss' as m; | ||
|
||
.container { | ||
display: flex; | ||
width: 452px; | ||
height: 36px; | ||
padding: 8px 0 8px 20px; | ||
border-radius: 8px; | ||
justify-content: space-between; | ||
align-items: center; | ||
@include m.Body; | ||
color: v.$black2-color; | ||
|
||
&_grey { | ||
background-color: v.$login-background; | ||
} | ||
} | ||
|
||
.time { | ||
color: #7e7e7e; | ||
margin-right: 20px; | ||
} | ||
|
||
.done { | ||
height: 24px; | ||
display: grid; | ||
grid-template-columns: 70px 70px 70px; | ||
column-gap: 5px; | ||
|
||
&_container { | ||
width: 70px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 3px; | ||
|
||
&_active { | ||
border: 1px solid v.$accent-color; | ||
} | ||
|
||
&_green { | ||
color: v.$analitics-green-text; | ||
background-color: rgba(v.$analitics-green-background, 0.3); | ||
@include m.BodyLarge; | ||
} | ||
|
||
&_grey { | ||
color: v.$name-task; | ||
background-color: v.$header-task-bg-color; | ||
@include m.BodyLarge; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import styles from './AnaliticsString.module.scss'; | ||
|
||
export interface AnaliticsStringProps { | ||
performer: string; | ||
index: number; | ||
activeColumn?: string; | ||
time?: string; | ||
inTime?: number; | ||
afterDeadline?: number; | ||
all?: number; | ||
} | ||
|
||
export const AnaliticsString: React.FC<AnaliticsStringProps> = ({ | ||
performer, | ||
time, | ||
inTime, | ||
afterDeadline, | ||
all, | ||
index, | ||
activeColumn, | ||
}) => { | ||
return ( | ||
<div | ||
className={`${styles.container} ${ | ||
index % 2 === 0 ? styles.container_grey : undefined | ||
}`} | ||
> | ||
<p>{performer}</p> | ||
{time ? ( | ||
<span className={styles.time}>{time}</span> | ||
) : ( | ||
<div className={styles.done}> | ||
<div | ||
className={`${styles.done_container} ${styles.done_container_green} ${ | ||
activeColumn === 'inTime' ? styles.done_container_active : undefined | ||
}`} | ||
> | ||
<span>{inTime}</span> | ||
</div> | ||
<div | ||
className={`${styles.done_container} ${styles.done_container_grey} ${ | ||
activeColumn === 'afterDeadline' ? styles.done_container_active : undefined | ||
}`} | ||
> | ||
<span>{afterDeadline}</span> | ||
</div> | ||
<div | ||
className={`${styles.done_container} ${ | ||
activeColumn === 'allDone' ? styles.done_container_active : undefined | ||
}`} | ||
> | ||
<span>{all}</span> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
AnaliticsString.defaultProps = { | ||
time: '', | ||
inTime: 0, | ||
afterDeadline: 0, | ||
all: 0, | ||
activeColumn: '', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.