-
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: add skeleton loader, closes #26
co-authored-by: wingck <ckwwingo@gmail.com>
- Loading branch information
1 parent
9f802cd
commit 94ce306
Showing
12 changed files
with
113 additions
and
24 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/components/skeletonLoader/RestaurantCardSkeletonLoader.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,21 @@ | ||
import ContentLoader from "react-content-loader"; | ||
|
||
const RestaurantCardSkeletonLoader: React.FC<{ width: string }> = ({ | ||
width, | ||
}) => ( | ||
<ContentLoader | ||
speed={1} | ||
width={width} | ||
height={285} | ||
viewBox={`0 0 ${width} 285`} | ||
backgroundColor="#f3f3f3" | ||
foregroundColor="#ecebeb" | ||
> | ||
<rect x="0" y="0" rx="0" ry="0" width="363" height="190" /> | ||
<rect x="48" y="202" rx="0" ry="0" width="80" height="20" /> | ||
<rect x="48" y="230" rx="0" ry="0" width="120" height="20" /> | ||
<rect x="48" y="257" rx="0" ry="0" width="200" height="20" /> | ||
</ContentLoader> | ||
); | ||
|
||
export default RestaurantCardSkeletonLoader; |
2 changes: 1 addition & 1 deletion
2
src/components/skeletonLoader/RestaurantDetailSkeletonLoader.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
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
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
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