-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
import Shimmer from 'components/Shimmer'; | ||
|
||
const DashboardContent = (): JSX.Element => { | ||
return ( | ||
<div className="flex flex-col w-full"> | ||
<Shimmer classAttributes="h-[302px] rounded-[12px]" /> | ||
<div className="flex flex-row justify-between mt-[38px]"> | ||
<div className="flex flex-col justify-between"> | ||
<Shimmer classAttributes="w-[318px] h-[18px] rounded-[14px]" /> | ||
<Shimmer classAttributes="w-[212px] h-[18px] rounded-[14px]" /> | ||
</div> | ||
<Shimmer classAttributes="w-[56px] h-[56px] rounded-full" /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DashboardContent; |
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,18 @@ | ||
import React from 'react'; | ||
|
||
interface ShimmerProps { | ||
classAttributes: string; | ||
} | ||
|
||
// Ref: https://delba.dev/blog/animated-loading-skeletons-with-tailwind | ||
const Shimmer = ({ classAttributes }: ShimmerProps): JSX.Element => { | ||
return ( | ||
<div | ||
className={`relative before:absolute before:inset-0 before:-translate-x-full before:animate-[shimmer_2s_infinite] before:bg-gradient-to-r before:from-transparent before:from-30% before:via-white/50 before:to-transparent before:to-70% isolate overflow-hidden shadow-xl shadow-black/5 ${classAttributes}`} | ||
> | ||
<div className={`bg-white bg-opacity-[.12] ${classAttributes}`}></div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Shimmer; |
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