From 20697e574aae13106993f9dcf8067d7d34903004 Mon Sep 17 00:00:00 2001 From: Ken <50104002+YouMinTW@users.noreply.github.com> Date: Thu, 22 Apr 2021 06:14:18 +0800 Subject: [PATCH] fix(bar): types don't allow bar component as any svg element (#1469) --- packages/bar/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bar/index.d.ts b/packages/bar/index.d.ts index 0537b886c..9324e449d 100644 --- a/packages/bar/index.d.ts +++ b/packages/bar/index.d.ts @@ -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 = ( datum: BarExtendedDatum, @@ -146,9 +146,9 @@ declare module '@nivo/bar' { SvgDefsAndFill & Partial<{ layers: Layer[] - onClick: BarMouseEventHandler - onMouseEnter: BarMouseEventHandler - onMouseLeave: BarMouseEventHandler + onClick: BarMouseEventHandler + onMouseEnter: BarMouseEventHandler + onMouseLeave: BarMouseEventHandler role: string }>