Skip to content

Commit 378fbd0

Browse files
committed
feat(repo-stat): improved loader state of stats
1 parent 5d93c30 commit 378fbd0

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/features/repo-stat/index.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,14 @@
4545
border-bottom-right-radius: var(--radius);
4646
}
4747
}
48+
49+
&__skeleton.ant-skeleton-element {
50+
flex-basis: 30%;
51+
width: 30%;
52+
border-radius: var(--radius);
53+
54+
& > span {
55+
width: 100%;
56+
}
57+
}
4858
}

src/features/repo-stat/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ const RepoStat = ({ repo }: Props) => {
2020

2121
return (
2222
<div className="repo-stat">
23-
{loading && <Skeleton.Input className="repo-state__skeleton" active />}
23+
{loading && (
24+
<div className="flex justify-between">
25+
<Skeleton.Button className="repo-stat__skeleton" active />
26+
<Skeleton.Button className="repo-stat__skeleton" active />
27+
<Skeleton.Button className="repo-stat__skeleton" active />
28+
</div>
29+
)}
2430
{!loading && (
2531
<div className="repo-stat__items flex justify-between">
2632
{stats.map(({ icon, link, name }) => (

0 commit comments

Comments
 (0)