Skip to content

Commit 82205b3

Browse files
committed
Fix copy to clipboard button changing width when loading.
1 parent 3c0376e commit 82205b3

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/css/edit/_sidebar.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ p.submit {
129129
font-size: 18px;
130130
}
131131

132+
.spinner-wrapper {
133+
block-size: 18px;
134+
inline-size: 18px;
135+
display: flex;
136+
align-items: center;
137+
}
138+
132139
.components-spinner {
133140
block-size: 12px;
134141
}

src/js/components/common/CopyToClipboardButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const StatusIcon: React.FC<StatusIconProps> = ({ status }) => {
2222
case Status.INITIAL:
2323
return <CopyIcon />
2424
case Status.PROGRESSING:
25-
return <Spinner />
25+
return <span className="spinner-wrapper"><Spinner /></span>
2626
case Status.SUCCESS:
2727
return <span className="dashicons dashicons-yes"></span>
2828
case Status.ERROR:

src/php/admin-menus/class-edit-menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function enqueue_assets() {
177177
'react-dom',
178178
'wp-url',
179179
'wp-i18n',
180-
'wp-elements',
180+
'wp-element',
181181
'wp-components',
182182
],
183183
$plugin->version,

0 commit comments

Comments
 (0)