@react-financial-charts/interactive
Version:
Interactive features for react-financial-charts
51 lines (50 loc) • 1.77 kB
TypeScript
import * as React from "react";
import { strokeDashTypes } from "@react-financial-charts/core";
export interface EachInteractiveYCoordinateProps {
readonly index?: number;
readonly draggable: boolean;
readonly yValue: number;
readonly bgFill: string;
readonly stroke: string;
readonly strokeWidth: number;
readonly strokeDasharray: strokeDashTypes;
readonly textFill: string;
readonly fontWeight: string;
readonly fontFamily: string;
readonly fontStyle: string;
readonly fontSize: number;
readonly text: string;
readonly selected: boolean;
readonly edge: object;
readonly textBox: {
readonly closeIcon: any;
readonly left: number;
readonly height: number;
readonly padding: any;
};
readonly onDrag?: (e: React.MouseEvent, index: number | undefined, moreProps: any) => void;
readonly onDragComplete?: (e: React.MouseEvent, moreProps: any) => void;
readonly onDelete?: (e: React.MouseEvent, index: number | undefined, moreProps: any) => void;
}
interface EachInteractiveYCoordinateState {
closeIconHover: boolean;
hover: boolean;
}
export declare class EachInteractiveYCoordinate extends React.Component<EachInteractiveYCoordinateProps, EachInteractiveYCoordinateState> {
static defaultProps: {
strokeWidth: number;
selected: boolean;
draggable: boolean;
};
private dragStartPosition;
private isHover;
private saveNodeType;
constructor(props: EachInteractiveYCoordinateProps);
render(): JSX.Element;
private readonly handleCloseIconHover;
private readonly handleHover;
private readonly handleDelete;
private readonly handleDrag;
private readonly handleDragStart;
}
export {};