@wordpress/block-library
Version:
Block library for the WordPress editor.
20 lines (17 loc) • 509 B
JavaScript
/**
* WordPress dependencies
*/
import { Tooltip, Dashicon } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
function ReusableBlockIndicator( { title } ) {
// translators: %s: title/name of the reusable block
const tooltipText = sprintf( __( 'Reusable Block: %s' ), title );
return (
<Tooltip text={ tooltipText }>
<span className="reusable-block-indicator">
<Dashicon icon="controls-repeat" />
</span>
</Tooltip>
);
}
export default ReusableBlockIndicator;