@spark-ui/components
Version:
Spark (Leboncoin design system) components.
68 lines (61 loc) • 2.39 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { PropsWithChildren, ComponentPropsWithRef } from 'react';
import * as class_variance_authority_types from 'class-variance-authority/types';
import { VariantProps } from 'class-variance-authority';
declare const skeletonStyles: (props?: ({
isAnimated?: boolean | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
type SkeletonStyleProps = ExcludeNull<VariantProps<typeof skeletonStyles>>;
interface SkeletonProps extends ComponentPropsWithRef<'div'>, SkeletonStyleProps {
/**
* Displays an animated light effect.
* @default true
*/
isAnimated?: boolean;
/**
* Adds an accessible fallback label.
*/
label?: string;
}
declare const Skeleton$1: {
({ isAnimated, label, className, children, ref: forwardedRef, ...rest }: PropsWithChildren<SkeletonProps>): react_jsx_runtime.JSX.Element;
displayName: string;
};
declare const skeletonItemStyles: (props?: ({
shape?: "circle" | "line" | "rectangle" | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
type SkeletonItemStyleProps = ExcludeNull<VariantProps<typeof skeletonItemStyles>>;
interface SkeletonItemProps extends ComponentPropsWithRef<'div'>, SkeletonItemStyleProps {
}
type SkeletonRectangleProps = Omit<SkeletonItemProps, 'shape'> & {
width?: string | number;
height?: string | number;
};
type SkeletonCircleProps = Omit<SkeletonItemProps, 'shape'> & {
size: string | number;
};
type SkeletonLineProps = Omit<SkeletonItemProps, 'shape'> & {
lines?: number;
/**
* Sets the gaps between group items.
*/
gap?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
};
declare const SkeletonRectangle: {
({ width, height, ...rest }: SkeletonRectangleProps): react_jsx_runtime.JSX.Element;
displayName: string;
};
declare const SkeletonCircle: {
({ size, ...rest }: SkeletonCircleProps): react_jsx_runtime.JSX.Element;
displayName: string;
};
declare const SkeletonLine: {
({ lines, gap: gapProp, className, ...rest }: SkeletonLineProps): react_jsx_runtime.JSX.Element;
displayName: string;
};
declare const Skeleton: typeof Skeleton$1 & {
Circle: typeof SkeletonCircle;
Line: typeof SkeletonLine;
Rectangle: typeof SkeletonRectangle;
};
export { Skeleton, type SkeletonProps };