recharts: Document presentation attrs in Label (#27092)

* recharts: Document presentation attrs in Label

* Add a test
This commit is contained in:
Paul Melnikow
2018-07-12 09:49:52 -07:00
committed by Ryan Cavanaugh
parent 6994703ab6
commit 928337ff78
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
// Dan Torberg <https://github.com/caspeco-dan>
// Peter Keuter <https://github.com/pkeuter>
// Jamie Saunders <https://github.com/jrsaunde>
// Paul Melnikow <https://github.com/paulmelnikow>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
@@ -832,7 +833,7 @@ export class Treemap extends React.Component<TreemapProps> { }
export class Label extends React.Component<LabelProps> { }
export interface LabelProps {
export interface LabelProps extends Partial<PresentationAttributes> {
angle?: number;
viewBox?: ViewBox | PolarViewBox;
formatter?: LabelFormatter;
+1 -1
View File
@@ -88,7 +88,7 @@ class Component extends React.Component<{}, ComponentState> {
<ResponsiveContainer>
<LineChart width={500} height={300} data={data}>
<XAxis dataKey="name">
<Label>X axis - name</Label>
<Label fontSize="8px">X axis - name</Label>
</XAxis>
<YAxis>
<Label>Y axis</Label>