Fix image loading skeleton
This commit is contained in:
@@ -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
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user