UNPKG

@wordpress/components

Version:
24 lines (20 loc) 599 B
/** * WordPress dependencies */ import { forwardRef } from '@wordpress/element'; import warning from '@wordpress/warning'; function ToolbarItem(_ref, ref) { let { children, ...props } = _ref; if (typeof children !== 'function') { typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production" ? warning('`ToolbarItem` is a generic headless component that accepts only function children props') : void 0; return null; } return children({ ...props, ref }); } export default forwardRef(ToolbarItem); //# sourceMappingURL=index.native.js.map