UNPKG

@wordpress/block-editor

Version:
35 lines (34 loc) 1.21 kB
// packages/block-editor/src/components/multi-selection-inspector/index.js import { sprintf, _n } from "@wordpress/i18n"; import { useSelect } from "@wordpress/data"; import { copy } from "@wordpress/icons"; import { __experimentalHStack as HStack } from "@wordpress/components"; import BlockIcon from "../block-icon"; import { store as blockEditorStore } from "../../store"; import { jsx, jsxs } from "react/jsx-runtime"; function MultiSelectionInspector() { const selectedBlockCount = useSelect( (select) => select(blockEditorStore).getSelectedBlockCount(), [] ); return /* @__PURE__ */ jsxs( HStack, { justify: "flex-start", spacing: 2, className: "block-editor-multi-selection-inspector__card", children: [ /* @__PURE__ */ jsx(BlockIcon, { icon: copy, showColors: true }), /* @__PURE__ */ jsx("div", { className: "block-editor-multi-selection-inspector__card-title", children: sprintf( /* translators: %d: number of blocks */ _n("%d Block", "%d Blocks", selectedBlockCount), selectedBlockCount ) }) ] } ); } export { MultiSelectionInspector as default }; //# sourceMappingURL=index.js.map