// source for https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Skeleton/Skeleton.js import * as React from 'react'; import { alpha, useTheme } from '@mui/system'; import { Box, BoxProps } from '../Box'; export interface SkeletonProps extends BoxProps { variant?: 'circular' | 'rounded'; width?: number | string; height?: number | string; } const Skeleton = React.forwardRef( function Skeleton(props, ref) { const { sx, variant: variantProps, width, height: heightProps, ...other } = props; const variant = variantProps || 'rounded'; const height = variant === 'circular' ? (heightProps ?? width) : (heightProps ?? '1.2rem'); const borderRadius = variant === 'circular' ? '50%' : 4; const theme = useTheme(); return ( ); }, ); export default Skeleton;