Switch Step Component
This component is designed for if/else
expressions, but you may use it for switch/case
expressions too.
Example
Check the Fullscreen Example.
Properties
Property | Type | Description |
---|---|---|
componentType | string | The type of the component. To use the icon step component you must set it to switch . |
id | string | The unique identifier of the step. We recommend to use the next() function from the Uid class to generate it. |
name | string | The name of the switch. |
type | string | Your custom type of the step. |
properties | object | The properties of the step. |
branches | object | The branches of the switch. |
Example
const step = {
componentType: 'switch',
id: '2a11d8498af26cdb67e2f27171e82f8e',
type: 'if',
name: 'If a > 10',
properties: {
expression: 'if (a > 10) return true; return false;'
},
branches: {
'true': [
// steps...
],
'false': [
// steps...
]
}
};
Customization
Pro Only
This part of the article is available only for subscribers of the pro package. Buy the pro package to get an access to this part.
If you have already subscription please log in.