Skip to content

Commit

Permalink
Update tooltip TypeScript types.
Browse files Browse the repository at this point in the history
- removed theme= from Basic/TableTooltip
- define Chip
  • Loading branch information
nfvs committed Aug 5, 2019
1 parent dbd44e2 commit d368ac2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/tooltip/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ declare module '@nivo/tooltip' {
color: string
format?: (value: number | string) => number | string
renderContent?: () => React.ReactNode
theme: Pick<Theme, 'tooltip'>
}

export class BasicTooltip extends React.Component<BasicTooltipProps> {}

export interface ChipProps {
size: number
color: string
style: Theme['tooltip']['chip']
}

export class Chip extends React.Component<ChipProps> {}

export interface TableTooltipProps {
title?: React.ReactNode
rows: React.ReactNode[][]
theme: Pick<Theme, 'tooltip'>
renderContent?: () => React.ReactNode
}

Expand Down

0 comments on commit d368ac2

Please sign in to comment.