ProfilationStep.js 2.13 KB
import React, {Component} from 'react';

import ProfilationStep1 from './step1/ProfilationStep1'
import ProfilationStep2 from './step2/ProfilationStep2'
import ProfilationStep2Mobile from './step2/ProfilationStep2Mobile'
import ProfilationStep3 from './step3/ProfilationStep3'
import ProfilationStep4 from './step4/ProfilationStep4'
import ProfilationStep5 from './step5/ProfilationStep5'

class ProfilationStep extends Component{

constructor(props){
	super(props)
	this.state={
		tabIndex:1
	}
}

render(){
const props=this.props

return(
<div className='ProfilationStep__container' style={{opacity: props.isActive ? 1 : 0.5, cursor: props.isActive ? 'auto' : 'pointer' }} id={'step'+props.index}>
	{props.index===0 &&
		<ProfilationStep1
			isActive={props.isActive}
			step={props.step}
			index={props.index}
			updatePropValue={props.updatePropValue}
			activeStep={props.activeStep}
		/>
	}
	{(props.index===1  && window.screen.width < 768) &&
		<ProfilationStep2Mobile
			isActive={props.isActive}
			step={props.step}
			index={props.index}
			updatePropValue={props.updatePropValue}
			completeSteps={props.completeSteps}
			activeStep={props.activeStep}
		/>
	}
	{(props.index===1  && window.screen.width >= 768) &&
		<ProfilationStep2
			isActive={props.isActive}
			step={props.step}
			index={props.index}
			updatePropValue={props.updatePropValue}
			completeSteps={props.completeSteps}
			activeStep={props.activeStep}
		/>
	}
	{props.index===2 &&
		
		<ProfilationStep3
			isActive={props.isActive}
			step={props.step}
			index={props.index}
			updatePropValue={props.updatePropValue}
			activeStep={props.activeStep}
		/>
	}
	{props.index===3 &&
		
		<ProfilationStep4
			isActive={props.isActive}
			step={props.step}
			index={props.index}
			updatePropValue={props.updatePropValue}
			activeStep={props.activeStep}
		/>
	}
	{props.index===4 &&
		
		<ProfilationStep5
			isActive={props.isActive}
			step={props.step}
			index={props.index}
			updatePropValue={props.updatePropValue}
			activeStep={props.activeStep}
		/>
	}
	
</div>)
}
}

export default ProfilationStep