UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

31 lines (30 loc) 1.19 kB
import { HTMLDataAttributes } from "../internal/internal-types.js"; import React from "react"; //#region src/Spinner/Spinner.d.ts declare const sizeMap: { small: string; medium: string; large: string; }; 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; } //#endregion export { SpinnerProps, Spinner as default };