Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Dashboard extends React.Component {
- constructor(props){
- super(props);
- this.state = {
- activeStep: 0,
- }
- this.handleStep = this.handleStep.bind(this);
- }
- handleStep(step) {
- this.setState({activeStep: step});
- };
- render(){
- const { classes, match } = this.props;
- const sprints = ['sprint 1', 'sprint 2', 'sprint 3'];
- const { activeStep } = this.state;
- return (
- <div className= {classes.root}>
- <div className = {classes.container} >
- <Stepper nonLinear activeStep={activeStep} alternativeLabel>
- {sprints.map((label,index)=>
- {
- return (
- <Step key={label}>
- <StepButton
- onClick= {this.handleStep(index)}
- >
- {label}
- </StepButton>
- </Step>
- )
- })
- }
- </Stepper>
- </div>
- </div>
- )
- }
- }
Add Comment
Please, Sign In to add comment