-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Charlie Rabiller
committed
Oct 21, 2021
1 parent
40aea3f
commit ef15be1
Showing
7 changed files
with
106 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
24 changes: 24 additions & 0 deletions
24
components/kit/components/elements/skeleton/HorizontalSkeletonCard.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,24 @@ | ||
import React from 'react'; | ||
|
||
const HorizontalSkeletonCard = () => { | ||
return ( | ||
<div className="bg-white w-1/2 mx-auto p-2 sm:p-4 sm:h-64 rounded-2xl shadow-lg flex flex-col sm:flex-row gap-5 select-none "> | ||
<div className="h-52 sm:h-full sm:w-72 rounded-xl bg-gray-200 animate-pulse"></div> | ||
<div className="flex flex-col flex-1 gap-5 sm:p-2"> | ||
<div className="flex flex-1 flex-col gap-3"> | ||
<div className="bg-gray-200 w-full animate-pulse h-14 rounded-2xl"></div> | ||
<div className="bg-gray-200 w-full animate-pulse h-3 rounded-2xl"></div> | ||
<div className="bg-gray-200 w-full animate-pulse h-3 rounded-2xl"></div> | ||
<div className="bg-gray-200 w-full animate-pulse h-3 rounded-2xl"></div> | ||
<div className="bg-gray-200 w-full animate-pulse h-3 rounded-2xl"></div> | ||
</div> | ||
<div className="mt-auto flex gap-3"> | ||
<div className="bg-gray-200 w-20 h-8 animate-pulse rounded-full"></div> | ||
<div className="bg-gray-200 w-20 h-8 animate-pulse rounded-full"></div> | ||
<div className="bg-gray-200 w-20 h-8 animate-pulse rounded-full ml-auto"></div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default HorizontalSkeletonCard; |
21 changes: 21 additions & 0 deletions
21
components/kit/components/elements/skeleton/PictureAndTextSkeleton.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 React from 'react'; | ||
|
||
const PictureAndTextSkeleton = () => { | ||
return ( | ||
<div className="bg-white rounded w-96 mx-auto rounded-2xl shadow-lg"> | ||
<div className="bg-gray-200 h-48 p-3 overflow-hidden animate-pulse"> </div> | ||
<div className="h- p-3"> | ||
<div className="grid grid-cols-3 gap-4 mt-2"> | ||
<div className="h-8 bg-gray-200 rounded animate-pulse"></div> | ||
<div className="h-8 bg-gray-200 rounded animate-pulse"></div> | ||
<div className="h-8 bg-gray-200 rounded animate-pulse"></div> | ||
<div className="h-8 col-span-2 bg-gray-200 rounded animate-pulse"></div> | ||
<div className=" h-8 bg-gray-200 rounded animate-pulse"></div> | ||
<div className="..."></div> | ||
<div className="col-span-2 ..."></div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default PictureAndTextSkeleton; |
16 changes: 16 additions & 0 deletions
16
components/kit/components/elements/skeleton/SimpleSkeleton.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,16 @@ | ||
import React from 'react'; | ||
|
||
const SimpleSkeleton = () => { | ||
return ( | ||
<div className="w-60 h-24 border-2 rounded-md mx-auto"> | ||
<div className="flex animate-pulse flex-row items-center h-full justify-center space-x-5"> | ||
<div className="w-12 bg-gray-300 h-12 rounded-full "></div> | ||
<div className="flex flex-col space-y-3"> | ||
<div className="w-36 bg-gray-300 h-6 rounded-md "></div> | ||
<div className="w-24 bg-gray-300 h-6 rounded-md "></div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default SimpleSkeleton; |
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,33 @@ | ||
import React, { FC } from 'react'; | ||
import AppLayout from '../../../components/layout/AppLayout'; | ||
import ComponentLayout from '../../../components/layout/ComponentLayout'; | ||
import SectionHeader from '../../../components/site/header/SectionHeader'; | ||
import SimpleSkeleton from '../../../components/kit/components/elements/skeleton/SimpleSkeleton'; | ||
import PictureAndTextSkeleton from '../../../components/kit/components/elements/skeleton/PictureAndTextSkeleton'; | ||
import HorizontalSkeletonCard from '../../../components/kit/components/elements/skeleton/HorizontalSkeletonCard'; | ||
|
||
const ComponentsPage: FC = () => { | ||
return ( | ||
<AppLayout | ||
title="Skeleton free Tailwind components" | ||
desc="Skeleton, banner, placeolder and more components for tailwind css" | ||
> | ||
<SectionHeader title="Skeletons" /> | ||
<ComponentLayout vertical={true} title="Simple" element={<SimpleSkeleton />} component={SimpleSkeleton} /> | ||
<ComponentLayout | ||
vertical={true} | ||
title="Card skeleton" | ||
element={<PictureAndTextSkeleton />} | ||
component={PictureAndTextSkeleton} | ||
/> | ||
<ComponentLayout | ||
vertical={true} | ||
title="Horizontal Card skeleton" | ||
element={<HorizontalSkeletonCard />} | ||
component={HorizontalSkeletonCard} | ||
/> | ||
</AppLayout> | ||
); | ||
}; | ||
|
||
export default ComponentsPage; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.