Skip to content

Commit

Permalink
fix(pie): tooltip props typing (#1088)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaZorkane committed Aug 5, 2020
1 parent 46bf12c commit 54215e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/pie/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ declare module '@nivo/pie' {
color: string
}

export type PieTooltip = PieDatumWithColor & {
label: string | number
}

export type AccessorFunc = (datum: PieDatum) => string

export type ValueFormatter = (value: number) => string | number
Expand Down Expand Up @@ -66,7 +70,7 @@ declare module '@nivo/pie' {
// interactivity
isInteractive: boolean
tooltipFormat: string | ValueFormatter
tooltip: React.StatelessComponent<PieDatumWithColor>
tooltip: React.FC<PieTooltip>

legends: LegendProps[]
}>
Expand Down

0 comments on commit 54215e7

Please sign in to comment.