Skip to content

Commit 729ba2f

Browse files
committed
Update docs to substepOf as objects
1 parent 38b312a commit 729ba2f

File tree

1 file changed

+30
-0
lines changed
  • packages/react-renderer-demo/src/doc-components/examples-texts/pf4

1 file changed

+30
-0
lines changed

packages/react-renderer-demo/src/doc-components/examples-texts/pf4/pf4-wizard.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,36 @@ Schema: [
127127
Progressive Wizard works same way. It checks if previous step has the same \`substepOf\` value and if so, it grouped them together.
128128
If the value is different, a new primary step is created with the step as a substep.
129129

130+
**React node as substepOf**
131+
132+
You can put a React node as `substepOf`. In this case you have to provide an object with keys `name: string` and `title?: ReactNode`.
133+
134+
```jsx
135+
<h2>Custom title</h2> // name: Configuration
136+
Security
137+
Credentials
138+
Summary
139+
```
140+
141+
```jsx
142+
Schema: [
143+
{
144+
name: 'security',
145+
title: 'Security',
146+
nextStep: 'credentials',
147+
substepOf: { name: 'Configuration', title: <h2>Custom title</h2> }
148+
},{
149+
name: 'credentials',
150+
title: 'Credentials',
151+
nextStep: 'summary',
152+
substepOf: 'Configuration' // title can be put only in the first step
153+
},{
154+
name: 'summary',
155+
title: 'Summary'
156+
},
157+
]
158+
```
159+
130160
**First step**
131161

132162
First step should have on the first position of the `fields` array.

0 commit comments

Comments
 (0)