UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

57 lines (56 loc) 1.54 kB
import * as React from 'react'; import type { PolymorphicForwardRefComponent } from '../../utils/index.js'; type ProgressLinearProps = { /** * Progress percentage. Should be a number between 0 and 100. */ value?: number; /** * Progress variant. If true, `value` will be ignored. * * Defaults to false if `value` is passed, otherwise true. */ indeterminate?: boolean; /** * Labels array. One label will be centered, two will be put to the sides. */ labels?: React.ReactNode[]; /** * Apply animation to the value change, if determinate. * @default false */ isAnimated?: boolean; /** * Status of progress. */ status?: 'positive' | 'negative' | 'warning'; /** * Pass props to ProgressLinear label group. */ labelGroupProps?: React.ComponentProps<'div'>; }; /** * Shows progress on a linear bar * @example * // Determinate * <ProgressLinear value={25}/> * // Indeterminate * <ProgressLinear indeterminate={true}/> * // Labeled - Center * <ProgressLinear value={50} labels={['Centered Label']} /> * // Labeled - Left & Right * <ProgressLinear value={50} labels={['Loading...', '50%']} /> * // Status * <ProgressLinear * status='positive' * labels={[ * 'Upload done!', * <Icon key='icon'> * <SvgStatusSuccess />{' '} * </Icon> * ]} * /> * <ProgressLinear status='negative' /> */ export declare const ProgressLinear: PolymorphicForwardRefComponent<"div", ProgressLinearProps>; export {};