applying loader in the settings respective components

This commit is contained in:
Prathamesh Gursal
2024-10-06 11:13:01 +05:30
parent 034dfffb85
commit 0fc48ea03f
5 changed files with 319 additions and 237 deletions

View File

@@ -1,10 +1,17 @@
import React from 'react';
const SkeletonLoader = ({ count = 1 }) => {
interface SkeletonLoaderProps {
count?: number; // Optional prop to define the number of skeleton loaders
}
const SkeletonLoader: React.FC<SkeletonLoaderProps> = ({ count = 1 }) => {
return (
<div className="flex space-x-4">
{[...Array(count)].map((_, idx) => (
<div key={idx} className="p-6 w-60 h-32 bg-gray-800 rounded-3xl animate-pulse">
<div
key={idx}
className="p-6 w-60 h-32 bg-gray-800 rounded-3xl animate-pulse"
>
<div className="space-y-4">
<div className="w-3/4 h-4 bg-gray-500 rounded"></div>
<div className="w-full h-4 bg-gray-500 rounded"></div>
@@ -18,5 +25,5 @@ const SkeletonLoader = ({ count = 1 }) => {
export default SkeletonLoader;
// calling function should be pass --- no. of sketeton cards
// calling function should be pass --- no. of sketeton cards
// eg . ----------->>> <SkeletonLoader count={4} />