Skip to content

Commit 63acff0

Browse files
t-hamanoandrewhaywardtyxlaciampomirka
authoredMar 2, 2024
Button: Place children before the icon when iconPosition is "right" (WordPress#59489)
* Button: Place children before the icon when `iconPosition` is "right" * Update changelog Co-authored-by: t-hamano <[email protected]> Co-authored-by: andrewhayward <[email protected]> Co-authored-by: tyxla <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: mirka <[email protected]>
1 parent 0b417ca commit 63acff0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎packages/components/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- `Tooltip`: Explicitly set system font to avoid CSS bleed ([#59307](https://github.com/WordPress/gutenberg/pull/59307)).
88
- `HStack`, `VStack`: Stop passing invalid props to underlying element ([#59416](https://github.com/WordPress/gutenberg/pull/59416)).
99
- `Button`: Fix focus outline in disabled primary variant ([#59391](https://github.com/WordPress/gutenberg/pull/59391)).
10+
- `Button`: Place `children` before the icon when `iconPosition` is `right` ([#59489](https://github.com/WordPress/gutenberg/pull/59489)).
1011

1112
### Internal
1213

‎packages/components/src/button/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ export function UnforwardedButton(
223223
<Icon icon={ icon } size={ iconSize } />
224224
) }
225225
{ text && <>{ text }</> }
226+
{ children }
226227
{ icon && iconPosition === 'right' && (
227228
<Icon icon={ icon } size={ iconSize } />
228229
) }
229-
{ children }
230230
</>
231231
);
232232

0 commit comments

Comments
 (0)
Please sign in to comment.