Schema
{
"$id": "/schema/Presentations/IfElse/1.0/index.json",
"type": "object",
"title": "IfElse",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"PresentationType",
"Condition"
],
"properties": {
"PresentationType": {
"type": "string",
"enum": [
"IfElse"
]
},
"Condition": {
"type": "object",
"description": "Specifies the condition that needs to be evaluated to determine whether the If or Else branch should be executed.",
"default": {
"Comparator": "Equals",
"LeftSide": "",
"RightSide": ""
}
},
"If": {
"type": "object",
"description": "Defines the object to be executed when the condition is met."
},
"Else": {
"type": "object",
"description": "Defines the object to be executed when the condition is not met."
}
},
"examples": [
{
"PresentationType": "IfElse",
"Condition": {
"Comparator": "NotEquals",
"LeftSide": "{{ Context.Identity.Id }}",
"RightSide": "null"
},
"If": {
"PresentationType": "Text",
"Text": "Welcome back"
},
"Else": {
"PresentationType": "Button",
"Text": "Sign in",
"OnClick": {
"Handler": "Navigation",
"Url": "/auth"
}
}
}
],
"x-icon": "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"6\" cy=\"6\" r=\"2\"/><circle cx=\"6\" cy=\"18\" r=\"2\"/><circle cx=\"18\" cy=\"12\" r=\"2\"/><path d=\"M6 8v8M8 6h6a2 2 0 0 1 2 2v2M8 18h6a2 2 0 0 0 2-2v-2\"/></svg>",
"x-exports": {
"html": true,
"ios": true
},
"x-family": "Presentations",
"x-name": "IfElse",
"x-version": "1.0",
"x-source-package": "zero-schema"
}
{
"PresentationType": "IfElse",
"Condition": {
"Comparator": "NotEquals",
"LeftSide": "{{ Context.Identity.Id }}",
"RightSide": "null"
},
"If": {
"PresentationType": "Text",
"Text": "Welcome back"
},
"Else": {
"PresentationType": "Button",
"Text": "Sign in",
"OnClick": {
"Handler": "Navigation",
"Url": "/auth"
}
}
}