-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[icons] Add fontSize
small and large
#12865
[icons] Add fontSize
small and large
#12865
Conversation
@JoshuaLicense Nice job! Please could you run |
e9b43e8
to
3046809
Compare
@JoshuaLicense I have rebased your branch on master, it was quite old. What do you think of moving the size property to the icon itself? We could add a |
@mbrookes Sure, forgot about that. @oliviertassinari Apologies, should be up-to-date now. I wasn't sure on resizing the Icon component as the actual icon size was not the issue (in this case). Would adding a ExamplesizeSmall: {
width: 40,
height: 40,
+ fontSize: theme.typography.pxToRem(23),
}, <IconButton aria-label="Delete" size="small" className={classes.button}>
<DeleteIcon
+ fontSize="inherit"
/>
</IconButton> |
I'm asking because we could solve two problems at once. Vuetify or Font awesome have a property to change the icons size. Once we have that, the icon button size issue can be solved almost for free. |
d11ffd0
to
488b3b6
Compare
488b3b6
to
4503e93
Compare
& update docs with an example using IconButton.
7ad30af
to
ad2dde7
Compare
fontSize
small and large
* [Icon Button] Add a size prop to control button size * Update API * [icons] Add a size property * Merge size and fontSize prop & update docs with an example using IconButton. * Fix comments incorrectly referring to the size prop * fix the visual regressions
|
I ran into the same issue as #12863 when using a dense
Toolbar
and anIconButton
. This resolves the sizing in the denseToolbar
and closes #12863.The small & large sizing is 8px either side of the medium size.
Closes #12863