Skip to content

Commit

Permalink
Doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
sametweb authored Dec 28, 2021
1 parent bf933a0 commit 10dbf33
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ React Step Builder is a headless, multi-step interface builder.

Using [npm](https://www.npmjs.com/):

$ npm install react-step-builder
```
npm install react-step-builder
```

<br />

Expand All @@ -24,29 +26,29 @@ Example:
import { Steps, StepsProvider, useSteps } from "react-step-builder";

const App = () => {
return (
<StepsProvider>
<MySteps />
</StepsProvider>
);
return (
<StepsProvider>
<MySteps />
</StepsProvider>
);
};

const MySteps = () => {
const { next, prev } = useSteps();

return (
<Steps>
<div>
<h1>Step 1</h1>
</div>
<div>
<h1>Step 2</h1>
</div>
<div>
<h1>Step 3</h1>
</div>
</Steps>
);
const { next, prev } = useSteps();

return (
<Steps>
<div>
<h1>Step 1</h1>
</div>
<div>
<h1>Step 2</h1>
</div>
<div>
<h1>Step 3</h1>
</div>
</Steps>
);
};

export default App;
Expand All @@ -62,20 +64,20 @@ A component whose each direct sibling is treated as a step. **Do not add anythin

```jsx
<Steps>
<Step1 />
<Step2 />
<NotAStep />
<Step1 />
<Step2 />
<NotAStep />
</Steps>
```

✅ Correct:

```jsx
<Steps>
<Step1 />
<Step2>
<NotAStep />
</Step2>
<Step1 />
<Step2>
<NotAStep />
</Step2>
</Steps>
```

Expand Down

0 comments on commit 10dbf33

Please sign in to comment.