-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1260 from hotosm/feat(manage-organizations)/imple…
…ment-skeleton-while-loading Feat(manage organizations)/implement skeleton while loading
- Loading branch information
Showing
3 changed files
with
133 additions
and
22 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
src/frontend/src/components/organisation/OrganizationCardSkeleton.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,57 @@ | ||
import React from 'react'; | ||
import CoreModules from '@/shared/CoreModules'; | ||
|
||
const OrganisationCardSkeleton = ({ cardsPerRow, defaultTheme }) => { | ||
return cardsPerRow.map((data, index) => { | ||
return ( | ||
<div | ||
key={`${data}-${index}`} | ||
style={{ | ||
width: `${100 / cardsPerRow.length}%`, | ||
padding: 5, | ||
border: '1px solid lightgray', | ||
marginTop: '1%', | ||
marginLeft: '0.1%', | ||
marginRight: '0.1%', | ||
height: 'inherit', | ||
}} | ||
> | ||
<div className="fmtm-flex fmtm-gap-4"> | ||
<div className="row fmtm-mt-3"> | ||
<div className="col-md-12"> | ||
<CoreModules.SkeletonTheme baseColor={defaultTheme.palette.loading['skeleton_rgb']}> | ||
<CoreModules.Skeleton width={100} style={{ marginTop: '3%' }} height={100} count={1} /> | ||
</CoreModules.SkeletonTheme> | ||
</div> | ||
</div> | ||
|
||
<div className="row mt-2 fmtm-w-full"> | ||
<div className="col-md-12"> | ||
<CoreModules.SkeletonTheme baseColor={defaultTheme.palette.loading['skeleton_rgb']}> | ||
<CoreModules.Skeleton width={100} style={{ marginTop: '3%' }} count={1} /> | ||
</CoreModules.SkeletonTheme> | ||
</div> | ||
<div className="col-md-4 mt-1"> | ||
<CoreModules.SkeletonTheme | ||
baseColor={defaultTheme.palette.loading['skeleton_rgb']} | ||
highlightColor={defaultTheme.palette.loading['skeleton_rgb']} | ||
> | ||
<CoreModules.Skeleton height={20} count={2} /> | ||
</CoreModules.SkeletonTheme> | ||
</div> | ||
<div className="col-md-12 fmtm-mt-4 fmtm-mb-2"> | ||
<CoreModules.SkeletonTheme | ||
baseColor={defaultTheme.palette.loading['skeleton_rgb']} | ||
highlightColor={defaultTheme.palette.loading['skeleton_rgb']} | ||
> | ||
<CoreModules.Skeleton width={69} style={{ marginTop: '3%', float: 'right' }} count={1} /> | ||
</CoreModules.SkeletonTheme> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}); | ||
}; | ||
|
||
export default OrganisationCardSkeleton; |
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