UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

25 lines 1.19 kB
import type React from 'react'; import type { HTMLDataAttributes } from '../internal/internal-types'; declare const sizeMap: { small: string; medium: string; large: string; }; export type SpinnerProps = { /** Sets the width and height of the spinner. */ size?: keyof typeof sizeMap; /** Sets the text conveyed by assistive technologies such as screen readers. Set to `null` if the loading state is displayed in a text node somewhere else on the page. */ srText?: string | null; /** @deprecated Use `srText` instead. */ 'aria-label'?: string; className?: string; style?: React.CSSProperties; /** Controls whether and how long to delay rendering the spinner. Set to `true` to delay by 1000ms, `'short'` to delay by 300ms, `'long'` to delay by 1000ms, or provide a custom number of milliseconds. */ delay?: boolean | 'short' | 'long' | number; } & HTMLDataAttributes; declare function Spinner({ size: sizeKey, srText, 'aria-label': ariaLabel, className, style, delay, ...props }: SpinnerProps): React.JSX.Element | null; declare namespace Spinner { var displayName: string; } export default Spinner; //# sourceMappingURL=Spinner.d.ts.map