We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
withBoundingRects
1 parent 1501575 commit fce2562Copy full SHA for fce2562
packages/visx-bounds/src/enhancers/withBoundingRects.tsx
@@ -1,5 +1,5 @@
1
/* eslint react/no-did-mount-set-state: 0, react/no-find-dom-node: 0 */
2
-import React from 'react';
+import React, { ComponentClass } from 'react';
3
import ReactDOM from 'react-dom';
4
5
const emptyRect = {
@@ -29,7 +29,7 @@ export type WithBoundingRectsProps = {
29
30
export default function withBoundingRects<Props extends object = {}>(
31
BaseComponent: React.ComponentType<Props>,
32
-) {
+): ComponentClass<Props> {
33
return class WrappedComponent extends React.PureComponent<Props> {
34
static displayName = `withBoundingRects(${BaseComponent.displayName || ''})`;
35
node: HTMLElement | undefined | null;
0 commit comments