diff --git a/README.md b/README.md index 2890401..d9c6de3 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,11 @@ Example: pass a footer component that contains a "previous" and "next" button to | ---------- | --------------- | ---------------------------------------------------------- | -------- | ------- | | startIndex | number | Indicate the wizard to start at the given step | ❌ | 0 | | header | React.ReactNode | Header that is shown above the active step | ❌ | | +| sidebar | React.ReactNode | Sidebar that is shown after the header, before the active step | ❌ | | | footer | React.ReactNode | Footer that is shown below the active stepstep | ❌ | | | onStepChange | (stepIndex) | Callback that will be invoked with the new step index when the wizard changes steps | ❌ | | - | wrapper | React.React.ReactElement | Optional wrapper that is exclusively wrapped around the active step component. It is not wrapped around the `header` and `footer` | ❌ | | +| wrapper | React.React.ReactElement | Optional wrapper that is exclusively wrapped around the active step component. It is not wrapped around the `header`, `sidebar` and `footer` | ❌ | | +| sidebarAndStepWrapper | React.React.ReactElement | Optional wrapper that is exclusively wrapped around the sidebar and active step component. It is not wrapped around the `header` and `footer` | ❌ | | | children | React.ReactNode | Each child component will be treated as an individual step | ✔️ | #### Example @@ -94,19 +96,27 @@ Example: pass a footer component that contains a "previous" and "next" button to // Example: show the active step in the header const Header = () =>

I am the header component

; +// Example: show the a sidebar +const Sidebar = () =>

I am the sidebar component

; + // Example: show the "previous" and "next" buttons in the footer const Footer = () =>

I am the footer component

; -// Example: Wrap steps in an ` ; +// Example: Wrap sidebar and steps in a Flexbox +const SidebarAndStepWrapper = () =>
; + const App = () => { return ( - } + sidebar={} footer={