Fix image loading skeleton

This commit is contained in:
Bill Thornton
2025-07-01 16:20:15 -04:00
parent fcc8c8c879
commit 93ec7af3f7
3 changed files with 53 additions and 34 deletions
+18
View File
@@ -0,0 +1,18 @@
import Skeleton, { type SkeletonProps } from '@mui/material/Skeleton/Skeleton';
import React, { FC } from 'react';
interface LoadingSkeletonProps extends SkeletonProps {
isLoading: boolean
}
export const LoadingSkeleton: FC<LoadingSkeletonProps> = ({
children,
isLoading,
...props
}) => (
isLoading ? (
<Skeleton {...props} />
) : (
children
)
);