UNPKG

@atlaskit/menu

Version:

A list of options to help users navigate, or perform actions.

53 lines (52 loc) 1.75 kB
/* menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */ import _extends from "@babel/runtime/helpers/extends"; import "./menu-group.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context'; const baseStyles = null; /** * __Menu group__ * * A menu group includes all the actions or items in a menu. * * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group) * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu) */ const MenuGroup = ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing = 'cozy', menuLabel, // Although this isn't defined on props it is available because we've used // Spread props below and on the jsx element. To forcibly block usage I've // picked it out and supressed the expected type error. // @ts-expect-error className: UNSAFE_className, ...rest }) => /*#__PURE__*/React.createElement(SpacingContext.Provider, { value: spacing }, /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, { value: "border" }, /*#__PURE__*/React.createElement("div", _extends({ "aria-busy": isLoading, style: { minWidth, maxWidth, minHeight, maxHeight }, "data-testid": testId, role: role // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 , className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className]), "aria-label": menuLabel // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props }, rest)))); export default MenuGroup;