generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix shimmer card component in mine page (#1284)
* fix: remove dev flag and related test and old UI code * fix: change received value * chore: change component name * fix: change shimmer card ui * fix: change shimmer card style and made it similar to task card
- Loading branch information
Showing
4 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import styles from './taskCardShimmer.module.scss'; | ||
|
||
const TaskCardShimmer = () => ( | ||
<div className={`${styles.taskCard}`} data-testid="task-shimmer-card"> | ||
<div className={`${styles.title} ${styles.animate}`}></div> | ||
<div className={`${styles.flexContainer}`}> | ||
<div className={`${styles.estimated} ${styles.animate}`}></div> | ||
<div className={`${styles.status} ${styles.animate}`}></div> | ||
</div> | ||
<div className={`${styles.started} ${styles.animate}`} /> | ||
<div className={`${styles.assignee} ${styles.animate}`} /> | ||
</div> | ||
); | ||
|
||
export default TaskCardShimmer; |
79 changes: 79 additions & 0 deletions
79
src/components/Loaders/taskCardShimmer/taskCardShimmer.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,79 @@ | ||
@import '../../../styles/variables.scss'; | ||
|
||
.taskCard { | ||
border: 2px solid $white; | ||
box-shadow: 0px 0px 10px 0 $light-gray; | ||
padding: 10px; | ||
border-radius: 8px; | ||
|
||
width: 55vw; | ||
min-width: 300px; | ||
min-height: 110px; | ||
|
||
margin-bottom: 2rem; | ||
|
||
& > * { | ||
border-radius: 8px; | ||
margin: 10px; | ||
} | ||
|
||
.title { | ||
min-height: 25px; | ||
width: 60%; | ||
} | ||
|
||
.estimated { | ||
min-height: 25px; | ||
width: 40%; | ||
} | ||
|
||
.started { | ||
min-height: 25px; | ||
width: 20%; | ||
} | ||
|
||
.status { | ||
min-width: 25px; | ||
width: 20%; | ||
} | ||
|
||
.assignee { | ||
min-height: 25px; | ||
width: 30%; | ||
} | ||
} | ||
|
||
@keyframes fullView { | ||
100% { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.flexContainer { | ||
display: flex; | ||
justify-content: space-between; | ||
|
||
& > * { | ||
border-radius: 8px; | ||
} | ||
} | ||
|
||
.animate { | ||
animation: shimmer 2s infinite linear; | ||
background: linear-gradient( | ||
to right, | ||
$shimmer-lighter 4%, | ||
$shimmer-darker 25%, | ||
$shimmer-lighter 36% | ||
); | ||
background-size: 1000px 100%; | ||
} | ||
|
||
@keyframes shimmer { | ||
0% { | ||
background-position: -1000px 0; | ||
} | ||
100% { | ||
background-position: 1000px 0; | ||
} | ||
} |
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