createComponentBuilder

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