Component: Button text is hidden in certain variations #44043
Labels
[Package] Components
/packages/components
[Type] Bug
An existing feature does not function as intended
Description
In the
Button
component, the button text is cut off when the following conditions are met:text
propicon
propisSmall
propWhen the above condition is met, the width of the button is fixed at 24px, regardless of the length of the text.
I think the cause is that the
has-text
class is not applied when text is specified by the text prop.gutenberg/packages/components/src/button/index.js
Line 104 in 0ac7078
Perhaps this issue is also related to #44042.
If the response to #44042 takes into account
has-text
class in the text prop, I believe this issue will be resolved as well.Step-by-step reproduction instructions
To check the behavior of the current button component, I used the following code in the core/code block.
Screenshots, screen recording, code snippet
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: