import * as React from 'react'; import classNames from 'classnames'; import type { ProgressProps, ProgressSize } from './progress'; interface StepsProps extends ProgressProps { steps: number; size?: ProgressSize; strokeColor?: string; trailColor?: string; } const Steps: React.FC = props => { const { size, steps, percent = 0, strokeWidth = 8, strokeColor, trailColor, prefixCls, children, } = props; const current = Math.round(steps * (percent / 100)); const stepWidth = size === 'small' ? 2 : 14; const styledSteps = []; for (let i = 0; i < steps; i += 1) { styledSteps.push(
, ); } return (
{styledSteps} {children}
); }; export default Steps;