import { forwardRef } from 'react'; import { cn } from '../../utils/cn'; export interface SkeletonWrapperProps extends React.ComponentPropsWithoutRef<'div'> { loading?: boolean; fullWidth?: boolean; } const SkeletonWrapper = forwardRef( ({ className, fullWidth = false, children, loading, ...props }, ref) => { if (!loading) return <>{children}; return (
*]:!invisible': loading, 'w-auto': fullWidth }, className )} {...props} > {children}
); } ); export { SkeletonWrapper };