@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
42 lines (39 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _components = require("@wordpress/components");
var _i18n = require("@wordpress/i18n");
var _icons = require("@wordpress/icons");
var _blockEditor = require("@wordpress/block-editor");
var _lockUnlock = require("../../lock-unlock");
var _jsxRuntime = require("react/jsx-runtime");
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
CommentIconSlotFill
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
const AddCommentButton = ({
onClick
}) => {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(CommentIconSlotFill.Fill, {
children: ({
onClose
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
icon: _icons.comment,
onClick: () => {
onClick();
onClose();
},
"aria-haspopup": "dialog",
children: (0, _i18n._x)('Comment', 'Add comment button')
})
});
};
var _default = exports.default = AddCommentButton;
//# sourceMappingURL=comment-button.js.map