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

Enhanced type defintion for withStyles #10880

Closed
wants to merge 7 commits into from
Closed

Enhanced type defintion for withStyles #10880

wants to merge 7 commits into from

Conversation

franklixuefei
Copy link
Contributor

Enhanced type defintion for withStyles to make it enforce the presence of StyledComponentProps<ClassKey> as part of the props in the wrapped component, and not expose the injected props (StyledComponentProps<ClassKey> in this case) to the outside world.

Enhanced type defintion for withStyles to make it enforce the presence of `StyledComponentProps<ClassKey>` as part of the props in the wrapped component, and not expose the injected props (`StyledComponentProps<ClassKey>` in this case) to the outside world.
@franklixuefei
Copy link
Contributor Author

franklixuefei commented Apr 2, 2018

Fixes #10879

@franklixuefei
Copy link
Contributor Author

franklixuefei commented Apr 2, 2018

Seems like I broke the unit tests. I just realized that this change will make decorate<SomeOwnProps>(TestClass); to fail, and removing the type parameter (SomeOwnProps) will fix it, i.e., decorate(TestClass)

@franklixuefei franklixuefei deleted the frank/types branch April 2, 2018 07:03
@zannager zannager added the package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants