@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 1.53 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/menu/group-label.tsx"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { Context } from './context';\nimport { Text } from '../text';\nimport * as Styled from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GroupLabel = forwardRef(function Group(props, ref) {\n const menuContext = useContext(Context);\n if (!menuContext?.store) {\n throw new Error('Menu.GroupLabel can only be rendered inside a Menu component');\n }\n return /*#__PURE__*/_jsx(Styled.GroupLabel, {\n ref: ref,\n render:\n /*#__PURE__*/\n // @ts-expect-error The `children` prop is passed\n _jsx(Text, {\n upperCase: true,\n variant: \"muted\",\n size: \"11px\",\n weight: 500,\n lineHeight: \"16px\"\n }),\n ...props,\n store: menuContext.store\n });\n});"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA;AAAA;AAGA,qBAAuC;AAMvC,qBAAwB;AACxB,kBAAqB;AACrB,aAAwB;AACxB,yBAA4B;AACrB,IAAMA,kBAAa,2BAAW,SAAS,MAAM,OAAO,KAAK;AAC9D,QAAM,kBAAc,2BAAW,sBAAO;AACtC,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,8DAA8D;AAAA,EAChF;AACA,SAAoB,uCAAAC,KAAY,mBAAY;AAAA,IAC1C;AAAA,IACA;AAAA;AAAA,MAGA,uCAAAA,KAAK,kBAAM;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,YAAY;AAAA,MACd,CAAC;AAAA;AAAA,IACD,GAAG;AAAA,IACH,OAAO,YAAY;AAAA,EACrB,CAAC;AACH,CAAC;",
"names": ["GroupLabel", "_jsx"]
}