@easyguide/stepper
v0.9.12
Published
Components stepper ui
Downloads
37
Keywords
Readme
@easyguide/stepper
Camponents stepper ui
Install
npm install --save @easyguide/stepper
Usage
import React, {Component} from 'react'
import Stepper, {withStep} from '@easyguide/stepper'
const Step = withStep(({ previous, next, activeStep }) => (
<section data-testid="step">
<h1>{activeStep}</h1>
<p>description</p>
<button onClick={previous} data-testid="step-previous-button">
previous
</button>
<button onClick={next} data-testid="step-next-button">
next
</button>
</section>
))
class Example extends Component {
render() {
return (
<Stepper>
<Step stepName="step 1" />
<Step stepName="step 2" />
</Stepper>
)
}
}
License
MIT © iamtchelo