UNPKG

@octopusdeploy/design-system-components

Version:
44 lines (43 loc) 1.48 kB
import type * as React from "react"; export interface SharedCircularProgressProps { /** * The size of the component. * Only two sizes are currently supported, small and large. */ size: CircularProgressSize; } export interface IndeterminateCircularProgressProps extends SharedCircularProgressProps { /** * Whether to show the circular progress as determinate. * * The progress should be shown as indeterminate when an action's overall completion can not be determined * such as loading data in the background. */ determinate?: false; } export interface DeterminateCircularProgressProps extends SharedCircularProgressProps { /** * The completion value in percent expressed as a numeric value between 0-100. */ value: number; /** * Whether to show the circular progress as determinate. * * The progress should be shown as determinate, that is, it is known how long an * action will take. */ determinate: true; } /** Props used for the {@link CircularProgress} component */ type CircularProgressProps = IndeterminateCircularProgressProps | DeterminateCircularProgressProps; /** * @example * ```tsx * <CircularProgressProps size="small" /> * ``` * Or for determinate progress: * <CircularProgress size="small" determinate > */ export declare const CircularProgress: React.FC<CircularProgressProps>; type CircularProgressSize = "small" | "large" | "container"; export {};