import { Progress, Statistic } from "antd"
import { ProgressGradient } from "antd/lib/progress/progress"
import React from "react"

interface Props {
    value?: number
    strokeColor?: string | ProgressGradient
    percent?: number
    valueStyle?: React.CSSProperties
}
/**
 * table 表格 progress
 * @param param0 
 * @returns 
 */
const ProgressTable: React.FC<Props> = ({ strokeColor, percent, valueStyle, value }) => {

    return <div style={{ height: 25, position: 'relative' }}>
        <Progress
            strokeColor={strokeColor}
            status="active"
            showInfo={false}
            percent={percent}
        />
        <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={value} valueStyle={valueStyle} /></span>
    </div>
}

export default React.memo(ProgressTable)