@gechiui/components
Version:
UI components for GeChiUI.
26 lines (25 loc) • 577 B
JavaScript
import { createElement } from "@gechiui/element";
/**
* Internal dependencies
*/
import { buildTermsTree } from './terms';
import TreeSelect from '../tree-select';
export default function AuthorSelect(_ref) {
let {
label,
noOptionLabel,
authorList,
selectedAuthorId,
onChange
} = _ref;
if (!authorList) return null;
const termsTree = buildTermsTree(authorList);
return createElement(TreeSelect, {
label,
noOptionLabel,
onChange,
tree: termsTree,
selectedId: selectedAuthorId
});
}
//# sourceMappingURL=author-select.js.map