mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-17 13:43:50 +09:00
Switched back to component extension
This is for maximum backwards compatibility as React Hook implementation is only supported in WP 5.2 and above.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
const { __ } = wp.i18n;
|
||||
const {
|
||||
Icon,
|
||||
Button,
|
||||
Toolbar,
|
||||
} = wp.components;
|
||||
const { BlockControls } = wp.blockEditor;
|
||||
|
||||
const EmbedControls = ( props ) => {
|
||||
const {
|
||||
switchBackToURLInput,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<>
|
||||
<BlockControls>
|
||||
<Toolbar>
|
||||
<Button
|
||||
label={ __( 'Edit URL' ) }
|
||||
onClick={ switchBackToURLInput }
|
||||
>
|
||||
<Icon icon="edit" />
|
||||
</Button>
|
||||
</Toolbar>
|
||||
</BlockControls>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default EmbedControls;
|
||||
Reference in New Issue
Block a user