@cerberus-design/react
Version:
The Cerberus Design React component library.
52 lines (51 loc) • 1.42 kB
text/typescript
import { ProgressBarRootProps } from './primitives';
/**
* This module contains the ProgressBar component.
* @module
*/
export type NonIndeterminateProgressBarProps = {
/**
* A unique identifier for the progress bar. Required for accessibility.
*/
id: string;
/**
* A description label for the progress bar. Required for accessibility.
*/
label: string;
/**
* The state of the progress bar.
*/
indeterminate?: never;
/**
* The current value of the progress bar.
*/
now: number;
};
export type IndeterminateProgressBarProps = {
/**
* A unique identifier for the progress bar. Required for accessibility.
*/
id: string;
/**
* A description label for the progress bar. Required for accessibility.
*/
label: string;
/**
* The state of the progress bar.
*/
indeterminate?: true;
/**
* The current value of the progress bar.
*/
now?: never;
};
export type ProgressBarProps = ProgressBarRootProps & (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps);
/**
* The ProgressBar component is used to display the progress of a task.
* @see https://cerberus.digitalu.design/react/progress-indicators
* @example
* ```tsx
* <ProgressBar value={75} />
* ```
*/
export declare function ProgressBar(props: ProgressBarProps): import("react/jsx-runtime").JSX.Element;