@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
31 lines (30 loc) • 833 B
TypeScript
export interface ProgressState {
/**
* The `value` of the progress indicator.
*
* If `null` the progress bar will be in `indeterminate` state
* @default 0
*/
value: number | null;
/**
* The minimum value of the progress
* @default 0
*/
min: number;
/**
* The maximum value of the
* @default 100
*/
max: number;
/**
* `true` if `value` is `null`
*/
isIndeterminate: boolean;
/**
* Percentage of the value progressed with respect to min & max
*/
percent: number | null;
}
export declare type ProgressInitialState = Pick<Partial<ProgressState>, "value" | "min" | "max">;
export declare type ProgressStateReturn = ProgressState;
export declare function useProgressState(props?: ProgressInitialState): ProgressStateReturn;