Skip to content

Commit

Permalink
fix(button): fix error Button cannot be used as a JSX component (#974)
Browse files Browse the repository at this point in the history
Fix error after updating to v0.6.0 Button cannot be used as a JSX component. Its return type
'ReactNode' is not a valid JSX element.

fix #962
  • Loading branch information
congon4tor authored Sep 18, 2023
1 parent db8d492 commit b621601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/generic-forward-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { forwardRef } from 'react';

// eslint-disable-next-line @typescript-eslint/ban-types
type FixedForwardRef = <T, P = {}>(
render: (props: P, ref: React.Ref<T>) => React.ReactNode,
) => (props: P & React.RefAttributes<T>) => React.ReactNode;
render: (props: P, ref: React.Ref<T>) => JSX.Element,
) => (props: P & React.RefAttributes<T>) => JSX.Element;

const genericForwardRef = forwardRef as FixedForwardRef;

Expand Down

1 comment on commit b621601

@vercel
Copy link

@vercel vercel bot commented on b621601 Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.