1.0.8 • Published 4 years ago

multi-step-form-ui v1.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

react-multi-step-form-component

A NPM package which lets user add their personal components as a step

Installation:

npm install multi-step-form-ui 
or 
yarn add multi-step-form-ui

Usage:

import MultiSteps from "multi-step-form-ui";
 <MultiSteps>
    <Component1 />
    <Component2 />
    <Component3/>
</MultiSteps>

You can pass your submit callback function in following way:

 <MultiSteps submitForm = {`<your_submit_callback>`}>
    <Component1 />
    <Component2 />
    <Component3/>
</MultiSteps>

To mark the step as completd you have to call completed function in following way inside each component:

  • To set step as incomplete this.props.completed(this.props.stepindex, false)
  • To set step as complete this.props.completed(this.props.stepindex, true)

Here this.props.stepindex is mandatory paramater

You can set title for your step in following way:

 <MultiSteps submitForm = {`<your_submit_callback>`}>
    <Component1 title = "Step1"/>
    <Component2 title = "Step1"/>
    <Component3/>
</MultiSteps>

Here title property is optional.

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago