Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (
setState( { hasCopied: true } ) }
onFinishCopy={ () => setState( { hasCopied: false } ) }
>
{ hasCopied ?
__( 'Copied!' ) :
__( 'Copy All Content' ) }
);
}
const Enhanced = compose(
query( ( select ) => ( {
editedPostContent: select( 'core/editor', 'getEditedPostContent' ),
} ) ),
withState( { hasCopied: false } )
)( CopyContentButton );
const buttonElement = ;
addFilter(
'editor.EditorActions.tools',
'core/copy-content/button',
( children ) => [ ...children, buttonElement ]
);