Skip to content

Commit

Permalink
fix: explicit children typing (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi authored Jul 25, 2022
1 parent 4bf6b5b commit c52e21f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export type ElementPropsWithElementRef<T = HTMLDivElement> = React.HTMLProps<T>
elementRef?: ElementRef<T>;
};

export type ElementRenderer<T = HTMLDivElement> = React.FC<ElementPropsWithElementRef<T>>;
export type ElementRenderer<T = HTMLDivElement> = React.FC<
React.PropsWithChildren<ElementPropsWithElementRef<T>>
>;

export type ElementPropsWithElementRefAndRenderer<T = HTMLDivElement> = React.HTMLProps<T> & {
elementRef?: ElementRef<T>;
Expand Down

0 comments on commit c52e21f

Please sign in to comment.