createComponent()
function createComponent<T>(type, overrides?): ComponentOf<T>;Creates a component of the given type with sensible defaults.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "text" | "image" | "line" | "rectangle" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type |
T |
overrides |
Partial<ComponentOf<T>> |
Returns
Section titled “Returns”ComponentOf<T>