When making a Button with an icon only, the icon is not centered
See original GitHub issueThe icon component inside Button adds a marginRight: 15px, what makes the icon get uncentered… the only way I found to fix this is…
<Button icon={{ name: 'filter-list', style: { marginRight: 0 } }}/>
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why are Icon-Buttons not centered? - Stack Overflow
Actually his answer was quite precise. By suppressing IconButton's padding, the icon will look like centered in parent's area. – Víctor Hugo.
Read more >Button and Icon Not Centering - HTML - Codecademy Forums
The text in the section is centering but I cannot figure out why the icon and and button are not also centered.
Read more >icon of su_button non centered | WordPress.org
This avoids me to manage texts in multilanguage pages. But, the icon is not centered, even with lack of text. The icon is...
Read more >IconButton class - material library - Flutter - Dart API docs
Defines how the icon is positioned within the IconButton. ... True if this widget will be selected as the initial focus when no...
Read more >How to target all Font Awesome icons and align them center?
The most preferred way to center Font Awesome Icons is to assign a center class to each <i> tag. Setting width to 100%,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @hendrul, I advise you to use the
Icon
component if you just need a clickable icon, as suggested in #639Just FYI, in the
v1.0.0-beta4
coming soon, the icon should be centered if you providetitle={null}
ortitle=""