Skip to content

Commit 1a0271d

Browse files
committed
Readme updated
1 parent da452f9 commit 1a0271d

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Using [npm](https://www.npmjs.com/):
2929

3030
```js
3131
<Steps>
32-
<Step title="My First Step" component={Step1} />
33-
<Step title="My Second Step" component={Step2} />
34-
<Step title="My Third Step" component={Step3} />
32+
<Step title="My First Step" component={Step1} />
33+
<Step title="My Second Step" component={Step2} />
34+
<Step title="My Third Step" component={Step3} />
3535
</Steps>
3636
```
3737

@@ -124,12 +124,19 @@ If your form element has `name="username"`, then it is stored in state as `{prop
124124

125125
This object provides information about current step and methods to move between steps. Available properties and methods:
126126

127+
### <strong>`props.allSteps`</strong>
128+
129+
`function()`
130+
131+
This function returns an array of each step's order number and title, can be used to create a progress bar above each step.
132+
127133
### Properties
128134

129135
- `props.step.order` - Order number of the props.step.
130136
- `props.step.title` - Title of the step (you provided when creating `<Step />` component)
131137
- `props.step.nextStep` - Order number of the next step, `null` if it's not available
132138
- `props.step.prevStep` - Order number of the previous step, `null` if it's not available
139+
- `props.step.progress` - A number from 0 to 1 that represents current step's progress (current order divided by total number of steps)
133140

134141
### Methods
135142

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-step-builder",
33
"description": "Unopinionated multi step interface builder.",
44
"author": "Samet Mutevelli <mutevellisamet@gmail.com> (https://sametmutevelli.com)",
5-
"version": "1.1.13",
5+
"version": "1.1.14",
66
"private": false,
77
"devDependencies": {
88
"@babel/cli": "^7.8.4",

0 commit comments

Comments
 (0)