-
-
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
[Button] Start icon font size override #28917
Comments
Ok I've fiddled with your example in CodeSandbox and discovered from the inspector that the |
I also noticed that your environment in the post and in the CodeSandbox do not match. You have Material-UI v4.12.2 in your post, but you use MUI v5.0.3 in your CodeSandbox. |
The font size is consistent across the Button. So the You can instead control the size of the whole button with Otherwise you'd have to battle specificity due to |
I wonder if @andra-sava is trying to scale the icon independent of the button's |
Yes, @coulgreer. This is what I want to achieve. Having a small icon in a large button for example. |
Nothing to add. Here is an example of how you can override it: https://codesandbox.io/s/iconlabelbuttons-material-demo-forked-gtz88?file=/demo.tsx You can parameterize it based on props. |
Thank you! Meanwhile I have used this workaround:
|
When passing a startIcon to a Button, it does not apply the given fontSize for that icon.
The issue can be also observed in the demos: https://codesandbox.io/s/iconlabelbuttons-material-demo-forked-m258l?file=/demo.js
Current Behavior 😯
I am passing two different font sizes like "large" or "small", but nothing changes.
Expected Behavior 🤔
Passing a valid fontSize to startIcon should increase or decrease the size of the icon accordingly.
Steps to Reproduce 🕹
Steps:
Your Environment 🌎
PS: If it helps, there was one more similar task for Checkbox. : #21289
The text was updated successfully, but these errors were encountered: