1 | import React, { ReactNode, ReactElement, SVGProps } from 'react';
|
2 | import { ViewBox } from '../util/types';
|
3 | export type ContentType = ReactElement | ((props: Props) => ReactNode);
|
4 | export type LabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'inside' | 'outside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideBottomLeft' | 'insideTopRight' | 'insideBottomRight' | 'insideStart' | 'insideEnd' | 'end' | 'center' | 'centerTop' | 'centerBottom' | 'middle' | {
|
5 | x?: number;
|
6 | y?: number;
|
7 | };
|
8 | interface LabelProps {
|
9 | viewBox?: ViewBox;
|
10 | parentViewBox?: ViewBox;
|
11 | formatter?: Function;
|
12 | value?: number | string;
|
13 | offset?: number;
|
14 | position?: LabelPosition;
|
15 | children?: ReactNode;
|
16 | className?: string;
|
17 | content?: ContentType;
|
18 | textBreakAll?: boolean;
|
19 | angle?: number;
|
20 | index?: number;
|
21 | }
|
22 | export type Props = Omit<SVGProps<SVGTextElement>, 'viewBox'> & LabelProps;
|
23 | export type ImplicitLabelType = boolean | string | number | ReactElement<SVGElement> | ((props: any) => ReactElement<SVGElement>) | Props;
|
24 | export declare function Label({ offset, ...restProps }: Props): React.JSX.Element;
|
25 | export declare namespace Label {
|
26 | var displayName: string;
|
27 | var parseViewBox: (props: any) => ViewBox;
|
28 | var renderCallByParent: (parentProps: {
|
29 | children?: React.ReactNode;
|
30 | label?: unknown;
|
31 | }, viewBox?: ViewBox, checkPropsLabel?: boolean) => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
32 | }
|
33 | export {};
|