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 and artemiomorales committed Jan 4, 2024
1 parent 2785c51 commit f3fd2c1
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

0 comments on commit f3fd2c1

Please sign in to comment.