-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Branching install pages
LizBaker edited this page Jan 19, 2023
·
3 revisions
Currently we have 3 types of overrides:
Type | Result | Syntax |
---|---|---|
replace | This will replace an existing step when a given option is selected | overrides: |
skip | This will skip (remove) an existing step when a given option is selected | overrides: |
isConditionalStep | This will keep a step hidden until a given option is selected | overrides: |
Here we have two different overrides and either one can trigger a skip or in this case conditionalStep appearing
- filePath: 'src/install/demo/dropdown2/addStep.mdx'
overrides:
- isConditionalStep: true
selectedOptions:
- optionType: dropdown2
options:
- value: 'thirdOption'
- isConditionalStep: true
selectedOptions:
- optionType: dropdown1
options:
- value: 'secondOption'
Here we have multiple options under one optionType which acts as an OR because you can only ever select a single option from a given dropdown
- filePath: 'src/install/demo/dropdown2/addStep.mdx'
overrides:
- isConditionalStep: true
selectedOptions:
- optionType: dropdown2
options:
- value: 'thirdOption'
- value: 'fourthOption'
Here we have a single override with multiple optionTypes and all of these options will need to be selected to trigger the skip or conditional step
- filePath: 'src/install/demo/dropdown2/addStep.mdx'
overrides:
- skip: true
selectedOptions:
- optionType: dropdown2
options:
- value: 'thirdOption'
- optionType: dropdown1
options:
- value: 'secondOption'