UNPKG

@wordpress/components

Version:
24 lines (22 loc) 612 B
/** * WordPress dependencies */ import { forwardRef, useContext } from '@wordpress/element'; /** * Internal dependencies */ import { Context } from './context'; import * as Styled from './styles'; import { jsx as _jsx } from "react/jsx-runtime"; export const Group = forwardRef(function Group(props, ref) { const menuContext = useContext(Context); if (!menuContext?.store) { throw new Error('Menu.Group can only be rendered inside a Menu component'); } return /*#__PURE__*/_jsx(Styled.Group, { ref: ref, ...props, store: menuContext.store }); }); //# sourceMappingURL=group.js.map