@wordpress/components
Version:
UI components for WordPress.
31 lines (27 loc) • 928 B
JavaScript
/**
* External dependencies
*/
import * as Ariakit from '@ariakit/react';
/**
* WordPress dependencies
*/
import { forwardRef } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useCompositeContext } from './context';
import { jsx as _jsx } from "react/jsx-runtime";
export const CompositeTypeahead = forwardRef(function CompositeTypeahead(props, ref) {
var _props$store;
const context = useCompositeContext();
// @ts-expect-error The store prop is undocumented and only used by the
// legacy compat layer. The `store` prop is documented, but its type is
// obfuscated to discourage its use outside of the component's internals.
const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;
return /*#__PURE__*/_jsx(Ariakit.CompositeTypeahead, {
store: store,
...props,
ref: ref
});
});
//# sourceMappingURL=typeahead.js.map