import { Skeleton as MuiSkeleton, type SkeletonProps, Box } from '@mui/material'; import clsx from 'clsx'; export interface RdsSkeletonProps extends Omit { frames?: number; shape?: 'text' | 'rectangular' | 'rounded' | 'circular'; animated?: boolean; animation?: 'pulse' | 'wave' | false; height?: number | string; width?: number | string; } const RdsSkeleton = ({ shape = 'text', frames = 1, animated = true, animation, sx, className = '', height, width, ...props }: RdsSkeletonProps) => { const isText = shape === 'text'; const bemClass = clsx('rds-skeleton', `rds-skeleton--${shape}`, className); const animationValue = typeof animation !== 'undefined' ? animation : (animated ? 'pulse' : false); if (frames > 1) { return ( {Array.from({ length: frames }, (_, frameNumber) => frameNumber + 1).map((frameNumber) => ( ))} ); } return ( ); }; RdsSkeleton.displayName = 'RdsSkeleton'; export default RdsSkeleton;