components/Slider/Steps.js
function getSteps (props) {
  const { step, min, max, value, isRangeType, orientation } = props;

  const steps = [];
  const totalSteps = ((max - min) / step) + 1;

  for (let i = 0; i < totalSteps; i++) {
    let position = getPositionInPercentage(i * step, min, max);
    if (isVertical(orientation)) position = 100 - position;

    const style = { [constants[orientation].direction]: `${position}%` };

    const className = classNames('slider-step', {
      'slider-step-active': isInActiveRange(i * step, value, isRangeType)
    });
    steps.push(<span className={className} key={i} style={style} />);
  }
  return steps;
}
function getSteps (props) {
  const { step, min, max, value, isRangeType, orientation } = props;

  const steps = [];
  const totalSteps = ((max - min) / step) + 1;

  for (let i = 0; i < totalSteps; i++) {
    let position = getPositionInPercentage(i * step, min, max);
    if (isVertical(orientation)) position = 100 - position;

    const style = { [constants[orientation].direction]: `${position}%` };

    const className = classNames('slider-step', {
      'slider-step-active': isInActiveRange(i * step, value, isRangeType)
    });
    steps.push(<span className={className} key={i} style={style} />);
  }
  return steps;
}
function getSteps ( props ) { const { step , min , max , value , isRangeType , orientation } = props ; const steps = [ ] ; const totalSteps = ( ( max - min ) / step ) + 1 ; for ( let i = 0 ; i < totalSteps ; i ++ ) { let position = getPositionInPercentage ( i * step , min , max ) ; if ( isVertical ( orientation ) ) position = 100 - position ; const style = { [ constants [ orientation ] . direction ] : ` ${ position } ` } ; const className = classNames ( 'slider-step' , { 'slider-step-active' : isInActiveRange ( i * step , value , isRangeType ) } ) ; steps . push ( < span className = { className } key = { i } style = { style } / > ) ; } return steps ; }
Array of step elements placed side by side
@param props
@returns {Array}
Array of step elements placed side by side