File tree Expand file tree Collapse file tree 2 files changed +51
-5
lines changed
Expand file tree Collapse file tree 2 files changed +51
-5
lines changed Original file line number Diff line number Diff line change 11import { useState , useEffect , useCallback } from 'react' ;
2- import { external , trash } from '@wordpress/icons' ;
2+ import { external , trash , copy } from '@wordpress/icons' ;
33import { Icon } from '@wordpress/icons' ;
44import { Spinner } from '@wordpress/components' ;
55import { logger } from '@php-wasm/logger' ;
@@ -239,9 +239,6 @@ export function MenuOverlay({ onClose }: MenuOverlayProps) {
239239 href = { getAppBlueprintUrl (
240240 app . blueprintUrl
241241 ) }
242- title = { getBlueprintPreview (
243- app . blueprintUrl
244- ) }
245242 >
246243 < span className = { css . featureIcon } >
247244 < WordPressIcon />
@@ -267,6 +264,20 @@ export function MenuOverlay({ onClose }: MenuOverlayProps) {
267264 </ span >
268265 </ span >
269266 </ a >
267+ < button
268+ className = { css . copyButton }
269+ onClick = { ( e ) => {
270+ e . preventDefault ( ) ;
271+ navigator . clipboard . writeText (
272+ getBlueprintPreview (
273+ app . blueprintUrl
274+ )
275+ ) ;
276+ } }
277+ title = "Copy blueprint"
278+ >
279+ < Icon icon = { copy } size = { 16 } />
280+ </ button >
270281 { app . isCustom && (
271282 < button
272283 className = { css . removeButton }
Original file line number Diff line number Diff line change 190190
191191.author {
192192 color : # 6b7280 ;
193+ opacity : 0 ;
194+ transition : opacity 0.15s ease;
195+ }
196+
197+ .appRow : hover .author {
198+ opacity : 1 ;
193199}
194200
195201.appRow {
202208 min-width : 0 ;
203209}
204210
211+ .copyButton {
212+ display : flex;
213+ align-items : center;
214+ justify-content : center;
215+ width : 28px ;
216+ height : 28px ;
217+ background : none;
218+ border : none;
219+ border-radius : 6px ;
220+ color : # 9ca3af ;
221+ cursor : pointer;
222+ flex-shrink : 0 ;
223+ opacity : 0 ;
224+ transition : all 0.15s ease;
225+ }
226+
227+ .copyButton svg {
228+ fill : currentColor;
229+ }
230+
231+ .appRow : hover .copyButton {
232+ opacity : 1 ;
233+ }
234+
235+ .copyButton : hover {
236+ background : rgba (56 , 88 , 233 , 0.15 );
237+ color : # 3858e9 ;
238+ }
239+
205240.removeButton {
206241 display : flex;
207242 align-items : center;
208243 justify-content : center;
209244 width : 28px ;
210245 height : 28px ;
211- margin-left : -8 px ;
246+ margin-left : 4 px ;
212247 background : none;
213248 border : none;
214249 border-radius : 6px ;
You can’t perform that action at this time.
0 commit comments