From 9c0eedfc3b766ba0a7897892b4be655867756981 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Fri, 1 Mar 2024 13:21:47 +0900 Subject: [PATCH 1/2] Button: Place children before the icon when `iconPosition` is "right" --- packages/components/src/button/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/button/index.tsx b/packages/components/src/button/index.tsx index 966075dd6e2b9a..a16f190e44704b 100644 --- a/packages/components/src/button/index.tsx +++ b/packages/components/src/button/index.tsx @@ -223,10 +223,10 @@ export function UnforwardedButton( ) } { text && <>{ text } } + { children } { icon && iconPosition === 'right' && ( ) } - { children } ); From dd6af089a43f69e7d966638b7c2b11ee440203c1 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Fri, 1 Mar 2024 13:45:19 +0900 Subject: [PATCH 2/2] Update changelog --- packages/components/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index d575fc96f83fc4..75da6d2c8b9681 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,6 +7,7 @@ - `Tooltip`: Explicitly set system font to avoid CSS bleed ([#59307](https://github.com/WordPress/gutenberg/pull/59307)). - `HStack`, `VStack`: Stop passing invalid props to underlying element ([#59416](https://github.com/WordPress/gutenberg/pull/59416)). - `Button`: Fix focus outline in disabled primary variant ([#59391](https://github.com/WordPress/gutenberg/pull/59391)). +- `Button`: Place `children` before the icon when `iconPosition` is `right` ([#59489](https://github.com/WordPress/gutenberg/pull/59489)). ### Internal