@wordpress/components
Version:
UI components for WordPress.
18 lines (16 loc) • 446 B
JavaScript
/**
* Internal dependencies
*/
import { withNext } from '../ui/context';
import { Tooltip as NextTooltip } from '../ui/tooltip';
const Tooltip = process.env.COMPONENT_SYSTEM_PHASE === 1 ? NextTooltip : undefined;
const adapter = ({
text,
...props
}) => ({ ...props,
content: text
});
export function withNextComponent(Component) {
return withNext(Component, Tooltip, 'WPComponentsTooltip', adapter);
}
//# sourceMappingURL=next.js.map