Skip to content

Commit

Permalink
fix(bar): types don't allow bar component as any svg element (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
YouMinTW authored Apr 21, 2021
1 parent f5dae75 commit 20697e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/bar/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare module '@nivo/bar' {

export type ValueFormatter = (value: number) => string | number

type GraphicsContainer = HTMLCanvasElement | SVGRectElement
type GraphicsContainer = HTMLCanvasElement | SVGElement

export type BarMouseEventHandler<T = GraphicsContainer> = (
datum: BarExtendedDatum,
Expand Down Expand Up @@ -146,9 +146,9 @@ declare module '@nivo/bar' {
SvgDefsAndFill<BarDatum> &
Partial<{
layers: Layer[]
onClick: BarMouseEventHandler<SVGRectElement>
onMouseEnter: BarMouseEventHandler<SVGRectElement>
onMouseLeave: BarMouseEventHandler<SVGRectElement>
onClick: BarMouseEventHandler<SVGElement>
onMouseEnter: BarMouseEventHandler<SVGElement>
onMouseLeave: BarMouseEventHandler<SVGElement>
role: string
}>

Expand Down

0 comments on commit 20697e5

Please sign in to comment.