Skip to content

Commit

Permalink
Add url to copy link button
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Feb 6, 2024
1 parent 01e31f0 commit 0a6d92c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ export default function LinkPreview( {
) }
<Button
icon={ copySmall }
label={ __( 'Copy link' ) }
// Ends up looking like "Copy link: https://example.com"
label={ `${ __( 'Copy link' ) }${
isEmptyURL ? '' : `: ${ value.url }`
}` }
ref={ ref }
disabled={ isEmptyURL }
size="compact"
Expand Down

0 comments on commit 0a6d92c

Please sign in to comment.