UNPKG

@wordpress/block-library

Version:
39 lines (38 loc) 1.06 kB
import { Fragment, jsx, jsxs } from "react/jsx-runtime"; import clsx from "clsx"; import { __ } from "@wordpress/i18n"; import { AlignmentControl, BlockControls, useBlockProps } from "@wordpress/block-editor"; function Edit({ setAttributes, attributes: { textAlign } }) { const blockProps = useBlockProps({ className: clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const blockControls = /* @__PURE__ */ jsx(BlockControls, { group: "block", children: /* @__PURE__ */ jsx( AlignmentControl, { value: textAlign, onChange: (newAlign) => setAttributes({ textAlign: newAlign }) } ) }); return /* @__PURE__ */ jsxs(Fragment, { children: [ blockControls, /* @__PURE__ */ jsx("div", { ...blockProps, children: /* @__PURE__ */ jsx( "a", { href: "#comment-reply-pseudo-link", onClick: (event) => event.preventDefault(), children: __("Reply") } ) }) ] }); } var edit_default = Edit; export { edit_default as default }; //# sourceMappingURL=edit.js.map