Skip to content

Commit

Permalink
fix(zoom): return ReactElement not ReactNode
Browse files Browse the repository at this point in the history
  • Loading branch information
williaster committed Dec 20, 2022
1 parent c649d28 commit 0489a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/visx-zoom/src/Zoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export type ZoomProps<ElementType> = {
constrain?: (transform: TransformMatrix, prevTransform: TransformMatrix) => TransformMatrix;
/** Initial transform matrix to apply. */
initialTransformMatrix?: TransformMatrix;
children: (zoom: ProvidedZoom<ElementType> & ZoomState) => React.ReactNode;
children: (zoom: ProvidedZoom<ElementType> & ZoomState) => React.ReactElement;
};

type ZoomState = {
Expand All @@ -114,7 +114,7 @@ function Zoom<ElementType extends Element>({
height,
constrain,
children,
}: ZoomProps<ElementType>): React.ReactNode {
}: ZoomProps<ElementType>): React.ReactElement {
const containerRef = useRef<ElementType>(null);
const matrixStateRef = useRef<TransformMatrix>(initialTransformMatrix);

Expand Down

0 comments on commit 0489a69

Please sign in to comment.