@wordpress/block-editor
Version:
36 lines (33 loc) • 943 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* WordPress dependencies
*/
import { Button } from '@wordpress/components';
const BlockView = ({
title,
rawContent,
renderedContent,
action,
actionText,
className
}) => {
return createElement("div", {
className: className
}, createElement("div", {
className: "block-editor-block-compare__content"
}, createElement("h2", {
className: "block-editor-block-compare__heading"
}, title), createElement("div", {
className: "block-editor-block-compare__html"
}, rawContent), createElement("div", {
className: "block-editor-block-compare__preview edit-post-visual-editor"
}, renderedContent)), createElement("div", {
className: "block-editor-block-compare__action"
}, createElement(Button, {
isSecondary: true,
tabIndex: "0",
onClick: action
}, actionText)));
};
export default BlockView;
//# sourceMappingURL=block-view.js.map