-
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.
feat(frontend): ✨ Create CartProduct loading skeleton component
- Loading branch information
Showing
5 changed files
with
89 additions
and
26 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
51 changes: 51 additions & 0 deletions
51
frontend/src/components/cards/product-rent/CardProductSkeleton.tsx
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,51 @@ | ||
import Skeleton, { SkeletonTheme } from "react-loading-skeleton"; | ||
import "react-loading-skeleton/dist/skeleton.css"; | ||
|
||
const CardProductSkeleton = () => { | ||
return ( | ||
<SkeletonTheme baseColor="#202020" highlightColor="#444"> | ||
<article className="relative flex flex-col gap-4 rounded-md bg-lowcontrast p-4"> | ||
<div className="flex gap-4"> | ||
<section className="relative aspect-square h-80 w-80 overflow-hidden rounded-lg"> | ||
<Skeleton height="100%" width="100%" /> | ||
</section> | ||
<div className="flex grow flex-col gap-10"> | ||
<div className="flex h-full flex-col gap-3"> | ||
<section className="flex flex-col gap-3"> | ||
<div className="flex items-center justify-end gap-3"> | ||
<div className="flex w-max items-center justify-center rounded px-3 py-1"> | ||
<Skeleton width={100} height={20} /> | ||
</div> | ||
</div> | ||
<div className="flex flex-col border-l-4 border-warning px-3 py-1"> | ||
<Skeleton height={25} width="75%" /> | ||
<Skeleton | ||
height={20} | ||
width="25%" | ||
style={{ marginTop: "8px" }} | ||
/> | ||
</div> | ||
</section> | ||
|
||
<section className="flex flex-col gap-3"> | ||
<Skeleton height={20} width="100%" /> | ||
<Skeleton height={20} width="75%" /> | ||
<Skeleton height={20} width="67%" /> | ||
</section> | ||
</div> | ||
<div className="flex grow basis-0 flex-col items-start justify-end"> | ||
<div className="mb-2 w-1/2"> | ||
<Skeleton height={35} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="h-8 w-full rounded-sm"> | ||
<Skeleton height={"100%"} /> | ||
</div> | ||
</article> | ||
</SkeletonTheme> | ||
); | ||
}; | ||
|
||
export default CardProductSkeleton; |
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