Skip to content

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 scope: table Changes related to the table. 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

scope: table Changes related to the table. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants