diff --git a/docs/src/content/docs/victory-label.md b/docs/src/content/docs/victory-label.md index 9b83fe928..22cee34ce 100644 --- a/docs/src/content/docs/victory-label.md +++ b/docs/src/content/docs/victory-label.md @@ -350,6 +350,14 @@ _examples:_ `text={(datum) => "x: " + datum.x}`, `text="Apples\n(green)"`, `text /> ``` +## textComponent + +`type: element` + +The `textComponent` prop takes a component instance which will be used to create text elements when `VictoryLabel` renders labels. + +_default:_ `` + ## textAnchor `type: "start" || "middle" || "end" || "inherit" || function` diff --git a/packages/victory-core/src/index.d.ts b/packages/victory-core/src/index.d.ts index 1087723cf..0aece663e 100644 --- a/packages/victory-core/src/index.d.ts +++ b/packages/victory-core/src/index.d.ts @@ -248,6 +248,7 @@ export interface VictoryLabelProps { style?: VictoryLabelStyleObject | VictoryLabelStyleObject[]; tabIndex?: NumberOrCallback; text?: string[] | StringOrNumberOrCallback; + textComponent?: React.ReactElement; textAnchor?: TextAnchorType | { (): TextAnchorType }; title?: string; transform?: string | {} | { (): string | {} };