File tree 1 file changed +30
-28
lines changed
1 file changed +30
-28
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ React Step Builder is a headless, multi-step interface builder.
12
12
13
13
Using [ npm] ( https://www.npmjs.com/ ) :
14
14
15
- $ npm install react-step-builder
15
+ ```
16
+ npm install react-step-builder
17
+ ```
16
18
17
19
<br />
18
20
@@ -24,29 +26,29 @@ Example:
24
26
import { Steps , StepsProvider , useSteps } from " react-step-builder" ;
25
27
26
28
const App = () => {
27
- return (
28
- < StepsProvider>
29
- < MySteps / >
30
- < / StepsProvider>
31
- );
29
+ return (
30
+ < StepsProvider>
31
+ < MySteps / >
32
+ < / StepsProvider>
33
+ );
32
34
};
33
35
34
36
const MySteps = () => {
35
- const { next , prev } = useSteps ();
36
-
37
- return (
38
- < Steps>
39
- < div>
40
- < h1> Step 1 < / h1>
41
- < / div>
42
- < div>
43
- < h1> Step 2 < / h1>
44
- < / div>
45
- < div>
46
- < h1> Step 3 < / h1>
47
- < / div>
48
- < / Steps>
49
- );
37
+ const { next , prev } = useSteps ();
38
+
39
+ return (
40
+ < Steps>
41
+ < div>
42
+ < h1> Step 1 < / h1>
43
+ < / div>
44
+ < div>
45
+ < h1> Step 2 < / h1>
46
+ < / div>
47
+ < div>
48
+ < h1> Step 3 < / h1>
49
+ < / div>
50
+ < / Steps>
51
+ );
50
52
};
51
53
52
54
export default App ;
@@ -62,20 +64,20 @@ A component whose each direct sibling is treated as a step. **Do not add anythin
62
64
63
65
``` jsx
64
66
< Steps>
65
- < Step1 / >
66
- < Step2 / >
67
- < NotAStep / >
67
+ < Step1 / >
68
+ < Step2 / >
69
+ < NotAStep / >
68
70
< / Steps>
69
71
```
70
72
71
73
✅ Correct:
72
74
73
75
``` jsx
74
76
< Steps>
75
- < Step1 / >
76
- < Step2>
77
- < NotAStep / >
78
- < / Step2>
77
+ < Step1 / >
78
+ < Step2>
79
+ < NotAStep / >
80
+ < / Step2>
79
81
< / Steps>
80
82
```
81
83
You can’t perform that action at this time.
0 commit comments