chowa
Version:
UI component library based on React
60 lines (59 loc) • 1.93 kB
TypeScript
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import * as PropTypes from 'prop-types';
export interface PercentageGradient {
[percentage: string]: string;
}
export interface DirectionGradient {
from: string;
to: string;
}
export declare type ProgressGradient = PercentageGradient | DirectionGradient;
export interface ProgressProps {
className?: string;
style?: React.CSSProperties;
percent?: number;
showInfo?: boolean;
strokeWidth?: number;
mode?: 'line' | 'circle';
strokeLinecap?: 'square' | 'round';
status?: 'normal' | 'active' | 'success' | 'exception';
formatter?: (percent: number) => string;
storkeColor?: string | ProgressGradient;
}
declare class Progress extends React.PureComponent<ProgressProps, any> {
static propTypes: {
className: PropTypes.Requireable<string>;
style: PropTypes.Requireable<object>;
percent: PropTypes.Requireable<number>;
showInfo: PropTypes.Requireable<boolean>;
strokeWidth: PropTypes.Requireable<number>;
mode: PropTypes.Requireable<string>;
strokeLinecap: PropTypes.Requireable<string>;
status: PropTypes.Requireable<string>;
formatter: PropTypes.Requireable<(...args: any[]) => any>;
storkeColor: PropTypes.Requireable<string | object>;
};
static defaultProps: {
percent: number;
status: string;
showInfo: boolean;
strokeWidth: number;
mode: string;
strokeLinecap: string;
};
private renderInfo;
private compileCircleGradient;
private renderCircle;
private compileLineGradient;
private renderLine;
render(): JSX.Element;
}
export default Progress;