|
| 1 | +import React from 'react'; |
| 2 | +import Skeleton from 'react-loading-skeleton'; |
| 3 | +import 'react-loading-skeleton/dist/skeleton.css'; |
| 4 | + |
| 5 | +export default function OrgSkeleton() { |
| 6 | + // Define an array with unique keys |
| 7 | + const skeletonRows = [{ id: 'row-1' }, { id: 'row-2' }, { id: 'row-3' }]; |
| 8 | + |
| 9 | + return ( |
| 10 | + <div className="p-4"> |
| 11 | + {/* Header Skeleton */} |
| 12 | + <Skeleton height={30} width={80} /> |
| 13 | + <Skeleton height={30} width="40%" className="mt-6" /> |
| 14 | + <div className="p-6 border-b-2 bg-gray-100 mt-6"> |
| 15 | + {/* <Skeleton height={60} className="mt-6 " /> */} |
| 16 | + <div className="flex px-6"> |
| 17 | + <Skeleton width={100} height={20} className='px-6 '/> |
| 18 | + <Skeleton width={100} height={20} className=' px-6 ml-20' /> |
| 19 | + <Skeleton width={100} height={20} className=' px-6 ml-20' /> |
| 20 | + <Skeleton width={100} height={20} className='px-6 ml-20'/> |
| 21 | + <Skeleton width={100} height={20} className='px-6 ml-28'/> |
| 22 | + </div> |
| 23 | + </div> |
| 24 | + {/* Skeleton for Table Rows */} |
| 25 | + {skeletonRows.map((row) => ( |
| 26 | + <div key={row.id} className="flex mb-4"> |
| 27 | + {/* Name and Email Skeleton */} |
| 28 | + <div className="flex space-x-4 px-16 w-4/5 "> |
| 29 | + <Skeleton height={20} width={100} className="mt-2 px-6" /> |
| 30 | + <Skeleton height={20} width={100} className="mt-2 px-16 ml-6 " /> |
| 31 | + <Skeleton height={50} width={150} className="mt-2 px-20 ml-6" /> |
| 32 | + <Skeleton height={20} width={50} className="mt-2 px-24 ml-6" /> |
| 33 | + </div> |
| 34 | + |
| 35 | + {/* Action Buttons Skeleton */} |
| 36 | + <div className="flex space-x-4 ml-20"> |
| 37 | + {/* <Skeleton width={30} height={30} borderRadius="50%" /> */} |
| 38 | + <Skeleton width={30} height={30} borderRadius="50%"/> |
| 39 | + <Skeleton width={30} height={30} borderRadius="50%" /> |
| 40 | + </div> |
| 41 | + </div> |
| 42 | + ))} |
| 43 | + <div className="flex justify-between"> |
| 44 | + <div className="flex space-x-4 p-4"> |
| 45 | + <Skeleton width={50} height={30} /> |
| 46 | + <Skeleton width={50} height={30} /> |
| 47 | + </div> |
| 48 | + <div className='mr-14'> |
| 49 | + <Skeleton width={300} height={30} /> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + ); |
| 54 | +} |
0 commit comments