@atlaskit/menu
Version:
A list of options to help users navigate, or perform actions.
53 lines (52 loc) • 2.12 kB
JavaScript
/* menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "menuLabel", "className"];
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';
var 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)
*/
var MenuGroup = function MenuGroup(_ref) {
var isLoading = _ref.isLoading,
maxWidth = _ref.maxWidth,
minWidth = _ref.minWidth,
minHeight = _ref.minHeight,
maxHeight = _ref.maxHeight,
testId = _ref.testId,
role = _ref.role,
_ref$spacing = _ref.spacing,
spacing = _ref$spacing === void 0 ? 'cozy' : _ref$spacing,
menuLabel = _ref.menuLabel,
UNSAFE_className = _ref.className,
rest = _objectWithoutProperties(_ref, _excluded);
return /*#__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: minWidth,
maxWidth: maxWidth,
minHeight: minHeight,
maxHeight: 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;