import { forwardRef, Ref, ReactElement } from 'react' import { ResponsiveWrapper, ResponsiveProps, WithChartRef } from '@nivo/core' import { ScatterPlot } from './ScatterPlot' import { ScatterPlotDatum, ScatterPlotSvgProps } from './types' export const ResponsiveScatterPlot = forwardRef( ( { defaultWidth, defaultHeight, onResize, debounceResize, ...props }: ResponsiveProps>, ref: Ref ) => ( {({ width, height }) => ( {...props} width={width} height={height} ref={ref} /> )} ) ) as ( props: WithChartRef>, SVGSVGElement> ) => ReactElement