@wordpress/block-library
Version:
Block library for the WordPress editor.
39 lines (38 loc) • 1.09 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let _wordpress_components = require("@wordpress/components");
let _wordpress_i18n = require("@wordpress/i18n");
let react_jsx_runtime = require("react/jsx-runtime");
// packages/block-library/src/query/edit/inspector-controls/sticky-control.jsx
const stickyOptions = [
{
label: (0, _wordpress_i18n.__)("Include"),
value: ""
},
{
label: (0, _wordpress_i18n.__)("Ignore"),
value: "ignore"
},
{
label: (0, _wordpress_i18n.__)("Exclude"),
value: "exclude"
},
{
label: (0, _wordpress_i18n.__)("Only"),
value: "only"
}
];
function StickyControl({ value, onChange }) {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_components.SelectControl, {
label: (0, _wordpress_i18n.__)("Sticky posts"),
options: stickyOptions,
value,
onChange,
help: (0, _wordpress_i18n.__)("Sticky posts always appear first, regardless of their publish date.")
});
}
exports.default = StickyControl;
//# sourceMappingURL=sticky-control.cjs.map