@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 1.03 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/menu/group.tsx"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { Context } from './context';\nimport * as Styled from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Group = forwardRef(function Group(props, ref) {\n const menuContext = useContext(Context);\n if (!menuContext?.store) {\n throw new Error('Menu.Group can only be rendered inside a Menu component');\n }\n return /*#__PURE__*/_jsx(Styled.Group, {\n ref: ref,\n ...props,\n store: menuContext.store\n });\n});"],
"mappings": ";AAGA,SAAS,YAAY,kBAAkB;AAMvC,SAAS,eAAe;AACxB,YAAY,YAAY;AACxB,SAAS,OAAO,YAAY;AACrB,IAAMA,SAAQ,WAAW,SAASA,OAAM,OAAO,KAAK;AACzD,QAAM,cAAc,WAAW,OAAO;AACtC,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,yDAAyD;AAAA,EAC3E;AACA,SAAoB,qBAAY,cAAO;AAAA,IACrC;AAAA,IACA,GAAG;AAAA,IACH,OAAO,YAAY;AAAA,EACrB,CAAC;AACH,CAAC;",
"names": ["Group"]
}