UNPKG

react18-loaders

Version:

A comprehensive library that unleashes the full potential of React 18 server components, providing customizable loading animation components alongside a fullscreen loader container. Designed to seamlessly integrate with React and Next.js.

23 lines (22 loc) 966 B
import { HTMLProps } from "react"; /** Interface declaring the common properties of the loaders */ export interface BaseProps extends HTMLProps<HTMLDivElement> { /** width of the loader element in pixels or a string with a length unit. */ width?: number | string; /** height of the loader element in pixels or a string with a length unit. */ height?: number | string; /** Color of the dots - CSS compatible color */ color?: string; } /** Other props - loaderClass is included here as we will extend BaseProps for other loaders */ export interface OtherProps { /** Loader class name */ loaderClass: string; dotRadius?: number | string; } /** * Base component to avoid code duplication * * default values should be specified in css files - so no need to set them in JSX */ export declare function Base({ width, height, color, loaderClass, dotRadius, ...props }: BaseProps & OtherProps): import("react/jsx-runtime").JSX.Element;