@wordpress/block-library
Version:
Block library for the WordPress editor.
19 lines (18 loc) • 725 B
JavaScript
import { __experimentalNumberControl } from "@wordpress/components";
import { __ } from "@wordpress/i18n";
import { jsx } from "react/jsx-runtime";
// packages/block-library/src/query/edit/inspector-controls/pages-control.jsx
const PagesControl = ({ pages, onChange }) => {
return /* @__PURE__ */ jsx(__experimentalNumberControl, {
label: __("Max pages to show"),
value: pages,
min: 0,
onChange: (newPages) => {
if (isNaN(newPages) || newPages < 0) return;
onChange({ pages: newPages });
},
help: __("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")
});
};
export { PagesControl, PagesControl as default };
//# sourceMappingURL=pages-control.mjs.map