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

[TableSortLabel] Relax IconComponent requirements in TypeScript #18936

Merged
merged 2 commits into from
Dec 27, 2019

Conversation

Igorbek
Copy link
Contributor

@Igorbek Igorbek commented Dec 20, 2019

According to the source TableSortLabel only passes className to the IconComponent: https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/TableSortLabel/TableSortLabel.js#L82-L84

So this PR relaxes the requirement to IconComponent prop in TypeScript.

Igor Oleinikov added 2 commits December 20, 2019 14:46
- IconComponent only requires to accept className prop
@mui-pr-bot
Copy link

No bundle size changes comparing 0b2196c...debe9ad

Generated by 🚫 dangerJS against debe9ad

@eps1lon eps1lon merged commit 0cb1c04 into mui:master Dec 27, 2019
@eps1lon
Copy link
Member

eps1lon commented Dec 27, 2019

@Igorbek Thanks!

@oliviertassinari oliviertassinari added the component: table This is the name of the generic UI component, not the React module! label Dec 27, 2019
@oliviertassinari oliviertassinari changed the title [TableSortLabel][TypeScript] Relax IconComponent requirements in TypeScript [TableSortLabel] Relax IconComponent requirements in TypeScript Dec 27, 2019
vkentta pushed a commit to vkentta/material-ui that referenced this pull request Nov 5, 2020
Related previous PR: mui#18936

Currently passing an element typed as `React.ComponentType<SvgIconProps>` (as IconComponent was originally typed) gives an error, as `className` is not required in `SvgIconProps`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: table This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants