diff --git a/components/progress/line.tsx b/components/progress/line.tsx index 06afa9685..1ffdbaae5 100644 --- a/components/progress/line.tsx +++ b/components/progress/line.tsx @@ -51,8 +51,16 @@ export const handleGradient = strokeColor => { }; const Line = (_, { attrs, slots }) => { - const { prefixCls, percent, successPercent, strokeWidth, size, strokeColor, strokeLinecap } = - attrs; + const { + prefixCls, + percent, + successPercent, + strokeWidth, + size, + strokeColor, + strokeLinecap, + trailColor, + } = attrs; let backgroundProps; if (strokeColor && typeof strokeColor !== 'string') { backgroundProps = handleGradient(strokeColor); @@ -61,6 +69,12 @@ const Line = (_, { attrs, slots }) => { background: strokeColor, }; } + + const trailStyle = trailColor + ? { + style: { backgroundColor: trailColor }, + } + : undefined; const percentStyle = { width: `${validProgress(percent)}%`, height: `${strokeWidth || (size === 'small' ? 6 : 8)}px`, @@ -80,7 +94,7 @@ const Line = (_, { attrs, slots }) => { return (