parent
364c138fac
commit
cb849d70e6
5 changed files with 82 additions and 48 deletions
@ -1,20 +1,44 @@ |
||||
import { isMobileScreen } from '../../lib/is-mobile.ts'; |
||||
|
||||
export function LoadingSolutions() { |
||||
const totalCount = isMobileScreen() ? 3 : 11; |
||||
|
||||
const loadingRow = ( |
||||
<li className="flex min-h-[78px] animate-pulse flex-wrap items-center justify-between overflow-hidden rounded-md bg-gray-200 sm:min-h-[44px] sm:animate-none sm:rounded-none sm:bg-transparent"> |
||||
<span className="flex items-center"> |
||||
<span className="block h-[28px] w-[28px] animate-pulse rounded-full bg-gray-200"></span> |
||||
<span |
||||
className={`ml-2 block h-[26px] w-[350px] animate-pulse rounded-full bg-gray-200`} |
||||
></span> |
||||
</span> |
||||
<span className="flex items-center gap-2"> |
||||
<span |
||||
className={ |
||||
'animated-pulse h-[26px] w-[80px] rounded-full bg-gray-200' |
||||
} |
||||
></span> |
||||
<span |
||||
className={ |
||||
'animated-pulse h-[26px] w-[113px] rounded-full bg-gray-200' |
||||
} |
||||
></span> |
||||
</span> |
||||
</li> |
||||
); |
||||
|
||||
return ( |
||||
<ul className="flex flex-col divide-y divide-transparent min-h-[500px]"> |
||||
{new Array(11).fill(0).map((_, index) => ( |
||||
<li key={index} className="flex h-[44px] items-center justify-between"> |
||||
<span className="flex items-center"> |
||||
<span className="block h-[28px] w-[28px] animate-pulse rounded-full bg-gray-200"></span> |
||||
<span |
||||
className={`ml-2 block h-[26px] w-[350px] animate-pulse rounded-full bg-gray-200`} |
||||
></span> |
||||
</span> |
||||
<span className="flex items-center gap-2"> |
||||
<span className={'w-[80px] rounded-full bg-gray-200 animated-pulse h-[26px]'}></span> |
||||
<span className={'w-[113px] rounded-full bg-gray-200 animated-pulse h-[26px]'}></span> |
||||
</span> |
||||
</li> |
||||
))} |
||||
<ul className="flex min-h-[500px] flex-col gap-2 divide-y sm:gap-0"> |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
{loadingRow} |
||||
</ul> |
||||
); |
||||
} |
||||
|
Loading…
Reference in new issue