import type {
SkeletonProps as ChakraSkeletonProps,
CircleProps,
} from '@chakra-ui/react';
import { Skeleton as ChakraSkeleton, Circle, Stack } from '@chakra-ui/react';
import * as React from 'react';
export interface SkeletonCircleProps extends ChakraSkeletonProps {
size?: CircleProps['size'];
}
export const SkeletonCircle = React.forwardRef<
HTMLDivElement,
SkeletonCircleProps
>(function SkeletonCircle(props, ref) {
const { size, ...rest } = props;
return (
);
});
export interface SkeletonTextProps extends ChakraSkeletonProps {
noOfLines?: number;
}
export const SkeletonText = React.forwardRef(
function SkeletonText(props, ref) {
const { noOfLines = 3, gap, ...rest } = props;
return (
{ Array.from({ length: noOfLines }).map((_, index) => (
)) }
);
},
);
export interface SkeletonProps extends Omit {
loading: boolean | undefined;
}
export const Skeleton = React.forwardRef(
function Skeleton(props, ref) {
const { loading = false, ...rest } = props;
return (
);
},
);