Search...

createComponentBuilder

export declare function createComponentBuilder<T extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {
    type: T;
}): MappedComponentTypes[T];
export declare function createComponentBuilder<T extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {
    type: T;
}): MappedComponentTypes[T];
Factory for creating components from API data.
NameConstraintsOptionalDefaultDescription
Tkeyof MappedComponentTypesNoThe type of component to use
NameTypeOptionalDescription
data(APIModalComponent | APIMessageComponent) & { type: T; }NoThe API data to transform to a component class