zent
Version:
一套前端设计语言和基于React的实现
42 lines (35 loc) • 1.01 kB
text/typescript
import { HTMLAttributes } from 'react';
export type IProgressType = 'line' | 'circle';
export type IProgressStatus = 'normal' | 'success' | 'exception';
export type IProgressFormatFn = (precent: number) => React.ReactNode;
type StrokeLinecap = 'square' | 'round';
export interface ICommonProgressProps {
percent?: number;
showInfo?: boolean;
strokeWidth?: number;
width?: number;
bgColor?: string;
strokeLinecap?: StrokeLinecap;
format?: IProgressFormatFn;
}
export interface IProgressProps
extends ICommonProgressProps,
HTMLAttributes<HTMLDivElement> {
type?: IProgressType;
status?: IProgressStatus;
normalColor?: string;
successColor?: string;
exceptionColor?: string;
style?: React.CSSProperties;
}
export interface IProgressInstanceProps extends ICommonProgressProps {
color: string;
state: IProgressStatus;
}
export interface IProgressInfoProps {
type: IProgressType;
percent: number;
format: IProgressFormatFn;
state: IProgressStatus;
color?: string;
}