@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
30 lines (29 loc) • 865 B
JavaScript
/**
* WordPress dependencies
*/
import { ToolbarButton } from '@wordpress/components';
import { _x } from '@wordpress/i18n';
import { comment as commentIcon } from '@wordpress/icons';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import { unlock } from '../../lock-unlock';
import { jsx as _jsx } from "react/jsx-runtime";
const {
CommentIconToolbarSlotFill
} = unlock(blockEditorPrivateApis);
const AddCommentToolbarButton = ({
onClick
}) => {
return /*#__PURE__*/_jsx(CommentIconToolbarSlotFill.Fill, {
children: /*#__PURE__*/_jsx(ToolbarButton, {
accessibleWhenDisabled: true,
icon: commentIcon,
label: _x('Comment', 'View comment'),
onClick: onClick
})
});
};
export default AddCommentToolbarButton;
//# sourceMappingURL=comment-button-toolbar.js.map