@wordpress/components
Version:
UI components for WordPress.
18 lines (17 loc) • 657 B
JavaScript
import { buildTermsTree } from "./terms.mjs";
import TreeSelect from "../tree-select/index.mjs";
import { jsx } from "react/jsx-runtime";
// packages/components/src/query-controls/author-select.tsx
function AuthorSelect({ label, noOptionLabel, authorList, selectedAuthorId, onChange: onChangeProp }) {
if (!authorList) return null;
const termsTree = buildTermsTree(authorList);
return /* @__PURE__ */ jsx(TreeSelect, {
label,
noOptionLabel,
onChange: onChangeProp,
tree: termsTree,
selectedId: selectedAuthorId !== void 0 ? String(selectedAuthorId) : void 0
});
}
export { AuthorSelect as default };
//# sourceMappingURL=author-select.mjs.map