-
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
2 changed files
with
49 additions
and
2 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,33 @@ | ||
const Loading = () => { | ||
return ( | ||
<div className="flex bg-gradient-to-b from-main via-secondary to-main rounded-xl p-2 text-white"> | ||
<button type="button" disabled> | ||
<svg | ||
className="animate-spin h-8 w-8 mr-3" | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 4335 4335" | ||
width="100" | ||
height="100" | ||
> | ||
<path | ||
fill="white" | ||
d="M3346 1077c41,0 75,34 75,75 0,41 -34,75 -75,75 -41,0 -75,-34 -75,-75 0,-41 34,-75 75,-75zm-1198 -824c193,0 349,156 349,349 0,193 -156,349 -349,349 -193,0 -349,-156 -349,-349 0,-193 156,-349 349,-349zm-1116 546c151,0 274,123 274,274 0,151 -123,274 -274,274 -151,0 -274,-123 -274,-274 0,-151 123,-274 274,-274zm-500 1189c134,0 243,109 243,243 0,134 -109,243 -243,243 -134,0 -243,-109 -243,-243 0,-134 109,-243 243,-243zm500 1223c121,0 218,98 218,218 0,121 -98,218 -218,218 -121,0 -218,-98 -218,-218 0,-121 98,-218 218,-218zm1116 434c110,0 200,89 200,200 0,110 -89,200 -200,200 -110,0 -200,-89 -200,-200 0,-110 89,-200 200,-200zm1145 -434c81,0 147,66 147,147 0,81 -66,147 -147,147 -81,0 -147,-66 -147,-147 0,-81 66,-147 147,-147zm459 -1098c65,0 119,53 119,119 0,65 -53,119 -119,119 -65,0 -119,-53 -119,-119 0,-65 53,-119 119,-119z" | ||
/> | ||
</svg> | ||
</button> | ||
<span className="mt-1">Chargement...</span> | ||
</div> | ||
); | ||
}; | ||
|
||
const LoadingIcon = ({ loadingIcon }) => { | ||
if (loadingIcon) | ||
return ( | ||
<div className="absolute justify-center ml-auto mr-auto"> | ||
<Loading /> | ||
</div> | ||
); | ||
return null; | ||
}; | ||
|
||
export { Loading, LoadingIcon }; |
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