@wordpress/block-library
Version:
Block library for the WordPress editor.
25 lines (22 loc) • 495 B
JavaScript
/**
* WordPress dependencies
*/
import { TextControl } from '@wordpress/components';
import { useEntityProp } from '@wordpress/core-data';
import { __ } from '@wordpress/i18n';
export default function NavigationMenuNameControl() {
const [ title, updateTitle ] = useEntityProp(
'postType',
'wp_navigation',
'title'
);
return (
<TextControl
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Menu name' ) }
value={ title }
onChange={ updateTitle }
/>
);
}