Skip to content

Commit

Permalink
Components: Fix logic of has-text class addition in Button (#56949)
Browse files Browse the repository at this point in the history
* Components: Remove fixed width for `compact` sized Buttons

* update changelog

* Fix logic of has-text class addition in Button

* fix changelog
  • Loading branch information
ntsekouras authored Dec 14, 2023
1 parent 053a8aa commit fbc1188
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- `TabPanel`: do not render hidden content ([#57046](https://github.com/WordPress/gutenberg/pull/57046)).

### Bug Fix

- `Button`: Fix logic of `has-text` class addition ([#56949](https://github.com/WordPress/gutenberg/pull/56949)).

## 25.14.0 (2023-12-13)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function UnforwardedButton(
'is-busy': isBusy,
'is-link': variant === 'link',
'is-destructive': isDestructive,
'has-text': !! icon && hasChildren,
'has-text': !! icon && ( hasChildren || text ),
'has-icon': !! icon,
} );

Expand Down

1 comment on commit fbc1188

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in fbc1188.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7209346998
📝 Reported issues:

Please sign in to comment.