File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,6 @@ import { renderLegendToCanvas } from '@nivo/legends'
27
27
import { useTooltip } from '@nivo/tooltip'
28
28
import { useBar } from './hooks'
29
29
30
- declare module 'react' {
31
- // eslint-disable-next-line @typescript-eslint/ban-types
32
- function forwardRef < T , P = { } > (
33
- render : ( props : P , ref : React . Ref < T > ) => React . ReactElement | null
34
- ) : ( props : P & React . RefAttributes < T > ) => React . ReactElement | null
35
- }
36
-
37
30
type InnerBarCanvasProps < RawDatum extends BarDatum > = Omit <
38
31
BarCanvasProps < RawDatum > ,
39
32
'renderWrapper' | 'theme'
Original file line number Diff line number Diff line change @@ -9,7 +9,12 @@ export const ResponsiveBarCanvas = forwardRef(function ResponsiveBarCanvas<
9
9
return (
10
10
< ResponsiveWrapper >
11
11
{ ( { width, height } ) => (
12
- < BarCanvas width = { width } height = { height } { ...props } ref = { ref } />
12
+ < BarCanvas
13
+ width = { width }
14
+ height = { height }
15
+ { ...( props as Omit < BarCanvasProps < BarDatum > , 'height' | 'width' > ) }
16
+ ref = { ref }
17
+ />
13
18
) }
14
19
</ ResponsiveWrapper >
15
20
)
You can’t perform that action at this time.
0 commit comments