Skip to content

Conversation

am1rb
Copy link
Collaborator

@am1rb am1rb commented Nov 25, 2019

No description provided.

@am1rb am1rb requested a review from PejmanNik November 25, 2019 18:08
export interface Props<T, U = T, V extends EmptyProps = EmptyProps>
extends ListRowsProps<T, U> {
className?: string;
Container?: ComponentType<{ className?: string; children: ReactNode }> | ElementType;

Choose a reason for hiding this comment

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

I think ElementType just cause type checking ignoring ComponentType<{ className?: string; children: ReactNode }>. can't we cast div to solve the problem?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right about type checking issue, I fixed this prop type. Now it's possible to set all HTML tags + valid react components that have required props.
Are you Ok with this idea?

@PejmanNik PejmanNik self-requested a review November 26, 2019 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants