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

[styles] Fix constraint on withStyles P parameter to allow StyledComponentProps #11156

Merged
merged 3 commits into from Apr 26, 2018

Conversation

pelotom
Copy link
Member

@pelotom pelotom commented Apr 26, 2018

The signature of withStyles wasn't quite right, because it disallowed using props that extend StyledComponentProps, e.g.

interface FooProps extends StyledComponentProps<'x' | 'y'> {
  a: number
  b: boolean
}
  
const ListItemContent = withStyles({ x: {}, y: {} })<FooProps>(props => <div />);

@pelotom pelotom requested a review from rosskevin April 26, 2018 16:31
@oliviertassinari oliviertassinari changed the title Fix constraint on withStyles P parameter to allow StyledComponentProps [styles] Fix constraint on withStyles P parameter to allow StyledComponentProps Apr 26, 2018
@rosskevin rosskevin merged commit b8bae94 into mui:v1-beta Apr 26, 2018
@pelotom pelotom deleted the fix-with-styles branch April 26, 2018 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants