choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
48 lines (47 loc) • 1.39 kB
TypeScript
import { Component, CSSProperties, ReactNode } from 'react';
import { Size } from '../_util/enum';
import { ProgressPosition, ProgressStatus, ProgressType } from './enum';
import ConfigContext, { ConfigContextValue } from '../config-provider/ConfigContext';
export interface ProgressProps {
prefixCls?: string;
className?: string;
type?: ProgressType;
percent?: number;
successPercent?: number;
format?: (percent?: number, successPercent?: number) => ReactNode;
status?: ProgressStatus;
showInfo?: boolean;
showPointer?: boolean;
strokeWidth?: number;
trailColor?: string;
strokeColor?: string;
width?: number;
style?: CSSProperties;
gapDegree?: number;
gapPosition?: ProgressPosition;
size?: Size;
}
export default class Progress extends Component<ProgressProps, {}> {
static displayName: string;
static get contextType(): typeof ConfigContext;
static Line: any;
static Circle: any;
static Loading: any;
static defaultProps: {
type: ProgressType;
percent: number;
showInfo: boolean;
showPointer: boolean;
trailColor: string;
size: Size;
};
context: ConfigContextValue;
renderPointer: () => JSX.Element;
/**
* 计算指针角度
*/
getPointerDeg: () => {
transform: string;
};
render(): JSX.Element;
}