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

IconButton in a TableCell resizes cell height #14129

Closed
2 tasks done
foxylion opened this issue Jan 9, 2019 · 4 comments
Closed
2 tasks done

IconButton in a TableCell resizes cell height #14129

foxylion opened this issue Jan 9, 2019 · 4 comments
Labels
component: icon button This is the name of the generic UI component, not the React module! component: table This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@foxylion
Copy link

foxylion commented Jan 9, 2019

When using a IconButton inside a TableCell I am unable to fit the icon inside the table row without increasing the height of the row. This leads to a higher row than the others.

image

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

I expected that the small variant of a IconButton should fit inside a TableCell or have any documentation/example that tells me how I can get a IconButton inside a TableCell without accidentally increasing the tables height.

Current Behavior 😯

The table row is a little bit higher than the others.

Steps to Reproduce 🕹

https://codesandbox.io/s/mm1kqy9x58

Context 🔦

We want to add an icon to some table rows.

Your Environment 🌎

Tech Version
Material-UI v3.8.2
@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 9, 2019

@foxylion I believe we could provide a size property to the icon button component. It would simplify the current workaround 🤔.

<IconButton style={{ padding: 8 }}>
  <Edit fontSize="small" />
</IconButton>

@oliviertassinari oliviertassinari added component: icon button This is the name of the generic UI component, not the React module! new feature New feature or request labels Jan 9, 2019
@foxylion
Copy link
Author

@oliviertassinari Thanks, this helped for the moment, we used your workaround.
Would be great when this gets at some point implemented.

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 6, 2019

The icon button now has a size prop, this problem should be solved: #14649.

@oliviertassinari oliviertassinari added the component: table This is the name of the generic UI component, not the React module! label Oct 6, 2019
@foxylion
Copy link
Author

foxylion commented Oct 6, 2019

@oliviertassinari Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: icon button This is the name of the generic UI component, not the React module! component: table This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants