import type { MutableRefObject } from 'react'; import type { InterfaceBoxProps } from '../../primitives/Box'; import type { IStackProps } from '../../primitives/Stack/Stack'; import type { CustomProps, ResponsiveValue } from '../../../components/types'; import type { ISizes } from '../../../theme/base/sizes'; import type { IColors } from '../../../theme/base/colors'; export interface InterfaceSkeletonProps extends InterfaceBoxProps { /** * The fadeIn duration in seconds */ fadeDuration?: number; /** * If true, it will render its children */ isLoaded?: boolean; /** * The animation speed in seconds */ speed?: number; /** * The color at the animation start */ startColor?: ResponsiveValue; /** * The color at the animation end */ endColor?: ResponsiveValue; /** * Sizes for Skeleton */ size?: ResponsiveValue; } export interface ISkeletonTextProps extends IStackProps { /** * The fadeIn duration in seconds */ fadeDuration?: number; /** * If true, it will render its children */ isLoaded?: boolean; /** * The animation speed in seconds */ speed?: number; /** * The color at the animation start */ startColor?: ResponsiveValue; /** * The color at the animation end */ endColor?: ResponsiveValue; /** * Number of Lines in text */ lines?: number; /** * Stying for each line */ _line?: Partial; /** * Props to be passed to the Stack used inside. */ _stack?: Partial; } export type ISkeletonComponentType = (( props: ISkeletonProps & { ref?: MutableRefObject } ) => JSX.Element) & { Circle: React.MemoExoticComponent< (props: ISkeletonProps & { ref?: MutableRefObject }) => JSX.Element >; Text: React.MemoExoticComponent< (props: ISkeletonTextProps & { ref?: MutableRefObject }) => JSX.Element >; }; export type ISkeletonProps = InterfaceSkeletonProps & CustomProps<'Skeleton'>;