File tree Expand file tree Collapse file tree 1 file changed +30
-28
lines changed
Expand file tree Collapse file tree 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.
1212
1313Using [ npm] ( https://www.npmjs.com/ ) :
1414
15- $ npm install react-step-builder
15+ ```
16+ npm install react-step-builder
17+ ```
1618
1719<br />
1820
@@ -24,29 +26,29 @@ Example:
2426import { Steps , StepsProvider , useSteps } from " react-step-builder" ;
2527
2628const App = () => {
27- return (
28- < StepsProvider>
29- < MySteps / >
30- < / StepsProvider>
31- );
29+ return (
30+ < StepsProvider>
31+ < MySteps / >
32+ < / StepsProvider>
33+ );
3234};
3335
3436const 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+ );
5052};
5153
5254export default App ;
@@ -62,20 +64,20 @@ A component whose each direct sibling is treated as a step. **Do not add anythin
6264
6365``` jsx
6466< Steps>
65- < Step1 / >
66- < Step2 / >
67- < NotAStep / >
67+ < Step1 / >
68+ < Step2 / >
69+ < NotAStep / >
6870< / Steps>
6971```
7072
7173✅ Correct:
7274
7375``` jsx
7476< Steps>
75- < Step1 / >
76- < Step2>
77- < NotAStep / >
78- < / Step2>
77+ < Step1 / >
78+ < Step2>
79+ < NotAStep / >
80+ < / Step2>
7981< / Steps>
8082```
8183
You can’t perform that action at this time.
0 commit comments