Conditional()
ts
function Conditional(props): Element[] | undefined;Defined in: components/conditional.tsx:122
Conditionally renders dynamic elements based on evaluated conditions (similar to if / else if / else logic).
Parameters
| Parameter | Type | Description |
|---|---|---|
props | ConditionalProps | Configuration of conditions and corresponding elements |
Returns
Element[] | undefined
A list of rendered React elements or undefined
Remarks
Evaluation order:
ifelseIf(in order)else
Only the first matching branch will be rendered.
Since
1.0.0
Author
Simon Kovtyk