Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: React dom failure when passing unknown props to child component #49

Merged
merged 3 commits into from
Apr 9, 2021
Merged

fix: React dom failure when passing unknown props to child component #49

merged 3 commits into from
Apr 9, 2021

Conversation

memoyil
Copy link
Contributor

@memoyil memoyil commented Apr 2, 2021

Screenshot 2021-04-02 at 13 35 56

}

const InactiveButton: PolymorphicComponent<InactiveButtonProps, "button"> = styled(Button)<InactiveButtonProps>`
background-color: transparent;
color: ${({ theme, colorKey }) => theme.colors[colorKey]};
Copy link
Contributor

Choose a reason for hiding this comment

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

The initial solution here is wrong imo. If you want to clean this, a better solution is to remove the colorkey attribute and compute the color based on the variant attribute

Copy link
Contributor

Choose a reason for hiding this comment

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

@memoyil

@RabbitDoge is right in it is not an ideal solution. Do you mind fixing it? No worries if you can't, I will get to it.

Copy link
Contributor Author

@memoyil memoyil Apr 8, 2021

Choose a reason for hiding this comment

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

@hachiojidev I will try to fix it :) if I could not I will ask your help. Thanks 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hachiojidev can you review it again?

@memoyil memoyil requested a review from RabbitDoge April 8, 2021 10:54
@hachiojidev hachiojidev merged commit e3c0272 into pancakeswap:master Apr 9, 2021
@memoyil memoyil deleted the fix/react_dom_failure_child_component_props branch April 9, 2021 00:04
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.

3 participants