UNPKG

@wordpress/components

Version:
24 lines (22 loc) 641 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 ItemHelpText = forwardRef(function ItemHelpText(props, ref) { const menuContext = useContext(Context); if (!menuContext?.store) { throw new Error('Menu.ItemHelpText can only be rendered inside a Menu component'); } return /*#__PURE__*/_jsx(Styled.ItemHelpText, { numberOfLines: 2, ref: ref, ...props }); }); //# sourceMappingURL=item-help-text.js.map