UNPKG

react-loading-indicators

Version:

Kit of elegant loading indicators for react applications

104 lines (79 loc) 3.23 kB
/// <reference types="react" /> import React$1 from 'react'; type Easing = "ease-in" | "ease-out" | "ease-in-out" | "linear" | "cubic-bezier(0.25, 0.1, 0.25, 1.0)" | "cubic-bezier(0.42, 0.0, 1.0, 1.0)" | "cubic-bezier(0.0, 0.0, 0.58, 1.0)" | "cubic-bezier(0.42, 0.0, 0.58, 1.0)" | "linear(0, 1)" | "steps(4, end)" | (string & {}); interface CommonProps { /** * Sets color of the indicator. * * When specifying alpha channel in **RGB** color format, it's recommended to explicitly use **RGBA**. */ color?: string | string[]; /** * Sets size of the indicator */ size?: "small" | "medium" | "large"; /** * Supply CSS in JS styles */ style?: React.CSSProperties; text?: string | boolean; /** * Sets color of text */ textColor?: string; /** * Unitless number `-5` through `5`. (`-`)Slows down, (`+`)speeds up animation. */ speedPlus?: -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5; /** Animation easing function, e.g `linear`, `ease-in` * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function | MDN Docs} */ easing?: Easing; } interface AtomProps extends CommonProps { } interface CommetProps extends CommonProps { } interface OrbitProgressProps extends CommonProps { /** * variant of an orbitting loading indicator. Defaults to `disc`. */ variant?: "dotted" | "spokes" | "disc" | "split-disc" | "track-disc"; /** * Make the animation more bold/compact. */ dense?: boolean; } interface FourSquareProps extends CommonProps { } interface MosaicProps extends CommonProps { } interface RipleProps extends CommonProps { } interface ThreeDotProps extends CommonProps { /** * Variant of a ThreeDot loading indicator. Defaults to `Pulsate`. */ variant?: "pulsate" | "bob" | "brick-stack" | "bounce"; } interface BlinkBlurProps extends CommonProps { } interface TrophySpinProps extends CommonProps { } interface SlabProps extends CommonProps { } interface LifeLineProps extends CommonProps { } declare const Atom: (props: AtomProps) => React$1.JSX.Element; declare const Commet: (props: CommetProps) => React$1.JSX.Element; declare const OrbitProgress: (props: OrbitProgressProps) => React$1.JSX.Element | null; declare const FourSquare: (props: FourSquareProps) => React$1.JSX.Element; declare const Mosaic: (props: MosaicProps) => React$1.JSX.Element; declare const Riple: (props: RipleProps) => React$1.JSX.Element; declare const ThreeDot: (props: ThreeDotProps) => React$1.JSX.Element | null; declare const BlinkBlur: (props: BlinkBlurProps) => React$1.JSX.Element; declare const TrophySpin: (props: TrophySpinProps) => React$1.JSX.Element; declare const Slab: (props: SlabProps) => React$1.JSX.Element; declare const LifeLine: (props: LifeLineProps) => React$1.JSX.Element; export { Atom, type AtomProps, BlinkBlur, type BlinkBlurProps, Commet, type CommetProps, FourSquare, type FourSquareProps, LifeLine, type LifeLineProps, Mosaic, type MosaicProps, OrbitProgress, type OrbitProgressProps, Riple, type RipleProps, Slab, type SlabProps, ThreeDot, type ThreeDotProps, TrophySpin, type TrophySpinProps };