IALabelControl

Intelligent Advisor Flows was only made available to select customers, and will not be made Generally Available.

An IALabelControl is suitable for displaying a piece of text as part of the flow with any substitutions already applied.

An example text renderer:

function LabelControl({control}: LabelControlProps) {
    return <div key={control.id} class="label">{control.text}</div>
}

Label controls have the style property available so that the appropriate styling can be applied to the label. For example, you could use code similar to below:

export function labelFactory(item: IALabelControl) {
    // handle label styling
    if (item.style === "h1") {
        return <h1>{item.text}</h1>;
    } else if (item.style === "h2") {
        return <h2>{item.text}</h2>;
    } else if (item.style === "h3") {
        return <h3>{item.text}</h3>;
    } else if (item.style === "h4") {
        return <h4>{item.text}</h4>;
    } else {
        // "default"
        return <div>{item.text}</div>
    }
}