UNPKG

@wordpress/components

Version:
20 lines (19 loc) 592 B
import { forwardRef, useContext } from "@wordpress/element"; import { Context } from "./context"; import * as Styled from "./styles"; import { jsx as _jsx } from "react/jsx-runtime"; const ItemHelpText = forwardRef(function ItemHelpText2(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, ...props }); }); export { ItemHelpText }; //# sourceMappingURL=item-help-text.js.map