Button: iconSize
prop doesn't work with some icons
#43745
Labels
[Package] Components
/packages/components
[Type] Bug
An existing feature does not function as intended
Description
I have found that the size is not applied to some of the
@wordpress/icons
when I specify theiconSize
attribute on a button component with SVG icons.These icons will be displayed at the expected size when the size is specified in the
Icons
component, not theButton
component.I checked the icon library and found that icons with
width
/height
attributes of the svg element match those with no size applied. I don't know why these icons don't reproduce when used in the Icons component, but I think SVG icons should be rendered at the size specified in theIcons
component and thewidth
/height
attributes are unnecessary on the svg element.The following are those icons:
Step-by-step reproduction instructions
I have rewritten
edit.js
in the code block to include code that designates all icons in@wordpress/icons
as buttons:Screenshots, screen recording, code snippet
The icon circled in red has
width
andheight
specified for the svg element and theiconSize
property is not applied.Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: