Skip to content

Commit

Permalink
fix(line): add types for pointLabel function
Browse files Browse the repository at this point in the history
Close #891
  • Loading branch information
wyze committed May 17, 2020
1 parent 468a553 commit b5464bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/line/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ declare module '@nivo/line' {
}
}

export type AccessorFunc = (datum: Point['data']) => string

export type PointMouseHandler = (point: Point, event: React.MouseEvent) => void

export interface PointTooltipProps {
Expand Down Expand Up @@ -196,7 +198,7 @@ declare module '@nivo/line' {

export interface LineSvgProps extends LineProps, MotionProps, SvgDefsAndFill<Datum> {
enablePointLabel?: boolean
pointLabel?: string
pointLabel?: string | AccessorFunc
pointLabelYOffset?: number
areaBlendMode?: string
useMesh?: boolean
Expand Down

0 comments on commit b5464bb

Please sign in to comment.