Skip to content

Commit dddbaa6

Browse files
author
Becca Bailey
authored
Merge pull request #2097 from FormidableLabs/patch-missing-text-component-type
Patch missing text component type
2 parents 5d96196 + c77206b commit dddbaa6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/src/content/docs/victory-label.md

+8
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,14 @@ _examples:_ `text={(datum) => "x: " + datum.x}`, `text="Apples\n(green)"`, `text
350350
/>
351351
```
352352

353+
## textComponent
354+
355+
`type: element`
356+
357+
The `textComponent` prop takes a component instance which will be used to create text elements when `VictoryLabel` renders labels.
358+
359+
_default:_ `<Text />`
360+
353361
## textAnchor
354362

355363
`type: "start" || "middle" || "end" || "inherit" || function`

packages/victory-core/src/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ export interface VictoryLabelProps {
248248
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
249249
tabIndex?: NumberOrCallback;
250250
text?: string[] | StringOrNumberOrCallback;
251+
textComponent?: React.ReactElement;
251252
textAnchor?: TextAnchorType | { (): TextAnchorType };
252253
title?: string;
253254
transform?: string | {} | { (): string | {} };

0 commit comments

Comments
 (0)