Skip to content

Commit 0598e12

Browse files
committed
update tests and documentation
1 parent 1df4838 commit 0598e12

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

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

+14
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ Used by `VictoryLabel`
8383
const TSpan = (props) => <tspan {...props} />;
8484
```
8585

86+
### TextPath
87+
88+
Used by `curvedLabelComponent` in VictoryPie.
89+
90+
```jsx
91+
const TextPath = (props) => {
92+
const { children, href, startOffset, ...rest } = props;
93+
return (
94+
<textPath href={href} startOffset={startOffset}>
95+
{children}
96+
</text>
97+
);
98+
```
99+
86100
## Simple Components
87101
88102
### Arc

packages/victory-core/src/exports.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ import {
8787
TSpan,
8888
Text,
8989
TextAnchorType,
90+
TextPath,
9091
TextProps,
9192
TextSize,
9293
TextSizeStyleInterface,
@@ -177,6 +178,7 @@ describe("victory-core", () => {
177178
"Style",
178179
"TSpan",
179180
"Text",
181+
"TextPath",
180182
"TextSize",
181183
"Timer",
182184
"TimerContext",

packages/victory/src/victory.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import {
6161
Style,
6262
TSpan,
6363
Text,
64+
TextPath,
6465
TextProps,
6566
TextSize,
6667
Transitions,
@@ -339,6 +340,7 @@ describe("victory", () => {
339340
"Style",
340341
"TSpan",
341342
"Text",
343+
"TextPath",
342344
"TextSize",
343345
"Timer",
344346
"TimerContext",

test/node/victory.test.js

+3
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ describe("victory", () => {
147147
it("exports Text", () => {
148148
expect(Victory.Text).toBeDefined();
149149
});
150+
it("exports TextPath", () => {
151+
expect(Victory.TextPath).toBeDefined();
152+
});
150153
it("exports TSpan", () => {
151154
expect(Victory.TSpan).toBeDefined();
152155
});

0 commit comments

Comments
 (0)