import React, { Component } from 'react';
import cls from 'classnames';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { Step as NextStep } from '@alifd/next';
import { StepProps as NextStepProps } from '@alifd/next/types/step';

interface StepProps extends Omit<NextStepProps, 'size'> {
  size?: 'small' | 'medium'
}
class Step extends Component<StepProps> {
  static Item = NextStep.Item;

  render() {
    return (
      <NextStep
        {...this.props}
        className = {cls(
          this.props.className, {
            'next-step-small': this.props.size === 'small',
          },
        )}
      />
    );
  }
}

hoistNonReactStatics(Step, NextStep);

export default Step;
