import range from 'lodash/range'; import classnames from 'classnames'; import { withBoundary } from 'common'; import { ContentWrapperFix } from './content_wrapper_fix'; type Props = { count: number; current: number; titles?: string[]; }; function StepsComponent({ count, current, titles }: Props) { return (
{range(1, count + 1).map((i) => (
{i >= current ? i : ''}
{titles[i - 1] && (
{titles[i - 1] || ''}
)}
))}
); } StepsComponent.defaultProps = { titles: [], }; StepsComponent.displayName = 'StepsComponent'; const Steps = withBoundary(StepsComponent); export { Steps };