@cimpress/react-components
Version:
React components to support the MCP styleguide
31 lines • 1.25 kB
TypeScript
import React from 'react';
import { PublicComponentProps } from './types';
export interface SpinnerProps extends PublicComponentProps {
/**
* Number greater than 0. The duration of the animation (i.e. time taken to make 2 rotations).
* @default 2
*/
duration?: number;
/**
* Setting this to true will render the spinner in the center of the page. (Note this does not take into account vertical scrolling).
* @default false
*/
fullPage?: boolean;
/**
* Called when component is unmounted. Argument supplied to callback is the current animation offset.
*/
handleOffset?: (currentOffset: number) => void;
/**
* Number between 0 and 1 (inclusive). Treated as a percentage.
* Starts the animation at the given offset time (e.g. offset=0.25 starts the animation 25% of the way through).
* @default 0
*/
offset?: number;
/**
* Size of spinner (large = 72px, medium = 38px, small = 16px).
* @default 'large'
*/
size?: 'large' | 'medium' | 'small';
}
export declare const Spinner: React.MemoExoticComponent<({ className, duration, fullPage, handleOffset, offset, size, ...rest }: SpinnerProps) => JSX.Element>;
//# sourceMappingURL=Spinner.d.ts.map