mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
[recharts] Improve Label props (#20016)
* Fix typo and is required * Add new viewbox type * Change tp correct contributor github link
This commit is contained in:
Vendored
+15
-7
@@ -2,7 +2,7 @@
|
||||
// Project: http://recharts.org/
|
||||
// Definitions by: Maarten Mulders <https://github.com/mthmulders>
|
||||
// Raphael Mueller <https://github.com/rapmue>
|
||||
// Roy Xue <https://github.com/xljroy>
|
||||
// Roy Xue <https://github.com/royxue>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -664,10 +664,18 @@ export interface TextProps extends Partial<CSSStyleDeclaration> {
|
||||
export class Text extends React.Component<TextProps> { }
|
||||
|
||||
export interface ViewBox {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
}
|
||||
export interface PolarViewBox {
|
||||
cx?: number;
|
||||
cy?: number;
|
||||
innerRadius?: number;
|
||||
outerRadius?: number;
|
||||
startAngle?: number;
|
||||
endAngle?: number;
|
||||
}
|
||||
export interface Coordinate {
|
||||
x: number;
|
||||
@@ -713,13 +721,13 @@ export interface TreemapProps {
|
||||
}
|
||||
|
||||
export interface Label {
|
||||
viewBox?: ViewBox;
|
||||
viewBox?: ViewBox | PolarViewBox;
|
||||
formatter?: RechartsFunction;
|
||||
value: string | number;
|
||||
position?: PositionType;
|
||||
offset?: number;
|
||||
content?: React.ReactElement<any> | RechartsFunction;
|
||||
chilren: any;
|
||||
children?: any;
|
||||
}
|
||||
|
||||
export class Treemap extends React.Component<TreemapProps> { }
|
||||
|
||||
Reference in New Issue
Block a user