@simspace/nivo-arcs
Version:
[](https://www.npmjs.com/package/@nivo/arcs)
26 lines • 1.14 kB
TypeScript
import * as React from 'react';
import { SpringValue, Interpolation } from '@react-spring/web';
import { DatumWithArcAndColor } from './types';
export declare type ArcMouseHandler<Datum extends DatumWithArcAndColor> = (datum: Datum, event: React.MouseEvent<SVGPathElement>) => void;
export interface ArcShapeProps<Datum extends DatumWithArcAndColor> {
datum: Datum;
style: {
opacity: SpringValue<number>;
color: SpringValue<string>;
borderWidth: number;
borderColor: SpringValue<string>;
path: Interpolation<string>;
};
onClick?: ArcMouseHandler<Datum>;
onMouseEnter?: ArcMouseHandler<Datum>;
onMouseMove?: ArcMouseHandler<Datum>;
onMouseLeave?: ArcMouseHandler<Datum>;
}
/**
* A simple arc component to be used typically with an `ArcsLayer`.
*
* Please note that the component accepts `SpringValue`s instead of
* regular values to support animations.
*/
export declare const ArcShape: <Datum extends DatumWithArcAndColor>({ datum, style, onClick, onMouseEnter, onMouseMove, onMouseLeave, }: ArcShapeProps<Datum>) => JSX.Element;
//# sourceMappingURL=ArcShape.d.ts.map