@wordpress/block-library
Version:
Block library for the WordPress editor.
17 lines (16 loc) • 752 B
JavaScript
import clsx from "clsx";
import { useBlockProps, useInnerBlocksProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
// packages/block-library/src/buttons/edit.jsx
const DEFAULT_BLOCK = { name: "core/button" };
function ButtonsEdit({ attributes, className }) {
const { fontSize, layout, style } = attributes;
const blockProps = useBlockProps({ className: clsx(className, { "has-custom-font-size": fontSize || style?.typography?.fontSize }) });
const innerBlocksProps = useInnerBlocksProps(blockProps, {
defaultBlock: DEFAULT_BLOCK,
orientation: layout?.orientation ?? "horizontal"
});
return /* @__PURE__ */ jsx("div", { ...innerBlocksProps });
}
export { ButtonsEdit as default };
//# sourceMappingURL=edit.mjs.map