UNPKG

@wordpress/components

Version:
8 lines (7 loc) 1.12 kB
{ "version": 3, "sources": ["../../src/menu/item-help-text.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 ItemHelpText = forwardRef(function ItemHelpText(props, ref) {\n const menuContext = useContext(Context);\n if (!menuContext?.store) {\n throw new Error('Menu.ItemHelpText can only be rendered inside a Menu component');\n }\n return /*#__PURE__*/_jsx(Styled.ItemHelpText, {\n numberOfLines: 2,\n ref: ref,\n ...props\n });\n});"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;AAGA,qBAAuC;AAMvC,qBAAwB;AACxB,aAAwB;AACxB,yBAA4B;AACrB,IAAMA,oBAAe,2BAAW,SAASA,cAAa,OAAO,KAAK;AACvE,QAAM,kBAAc,2BAAW,sBAAO;AACtC,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,gEAAgE;AAAA,EAClF;AACA,SAAoB,uCAAAC,KAAY,qBAAc;AAAA,IAC5C,eAAe;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AACH,CAAC;", "names": ["ItemHelpText", "_jsx"] }