import React, { CSSProperties } from 'react' import cn from 'classnames' import px from '@lib/to-pixels' import s from './Skeleton.module.css' interface Props { width?: string | number height?: string | number boxHeight?: string | number style?: CSSProperties show?: boolean block?: boolean className?: string } const Skeleton: React.FC = ({ style, width, height, children, className, show = true, boxHeight = height, }) => { // Automatically calculate the size if there are children // and no fixed sizes are specified const shouldAutoSize = !!children && !(width || height) // Defaults width = width || 24 height = height || 24 boxHeight = boxHeight || height return ( {children} ) } export default Skeleton