@payfit/unity-components
Version:
25 lines (24 loc) • 1.39 kB
TypeScript
import { HTMLAttributes } from 'react';
export type SpinnerProps = Pick<HTMLAttributes<HTMLDivElement>, 'aria-hidden' | 'role'> & {
/** The label text for the spinner */
label: string;
/** The size of the spinner, can be 'small' for 16px size or 'medium' for 24px size */
size: 'small' | 'medium';
/** Te spinner's color, can be 'primary', 'inverted', or 'inherit', which will make it take the element's `currentColor` */
color?: 'primary' | 'inverted' | 'inherit';
};
/**
* The Spinner component indicates that content is loading or an action is being processed.
* @remarks
* - It uses `role="status"` and an `aria-live="polite"` region by default.
* - It is not included in the keyboard tab order.
* - Always provide a `label` for assistive technologies, even though it is only visible at the medium size.
*/
export declare const Spinner: import('react').ForwardRefExoticComponent<Pick<HTMLAttributes<HTMLDivElement>, "role" | "aria-hidden"> & {
/** The label text for the spinner */
label: string;
/** The size of the spinner, can be 'small' for 16px size or 'medium' for 24px size */
size: "small" | "medium";
/** Te spinner's color, can be 'primary', 'inverted', or 'inherit', which will make it take the element's `currentColor` */
color?: "primary" | "inverted" | "inherit";
} & import('react').RefAttributes<HTMLDivElement>>;