UNPKG

@atlaskit/menu

Version:

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

44 lines (43 loc) • 1.66 kB
/* heading-item.tsx generated by @compiled/babel-plugin v3.0.4 */ import _extends from "@babel/runtime/helpers/extends"; import "./heading-item.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { memo } from 'react'; import { fg } from '@atlaskit/platform-feature-flags/fg'; const headingStyles = null; const semanticHeadingStyles = null; /** * __Heading item__ * * @deprecated All menu components are deprecated. For dropdown menus, use `@atlaskit/dropdown-menu`. For anything else use a list. * * A heading item is used to describe sibling menu items. * * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item) * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu) */ const HeadingItem = /*#__PURE__*/memo(({ children, testId, headingLevel = 2, id, // 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 }) => { return /*#__PURE__*/React.createElement("div", _extends({ role: "heading", "aria-level": headingLevel, "data-testid": testId, "data-ds--menu--heading-item": true, id: id // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 , className: ax(["_11c8i4vh _1rjcze3t _18zrpxbi _syazazsu", fg('platform-semantic-spacing') && "_1rjcze3t _18zrbwzm", UNSAFE_className]) }, rest), children); }); export default HeadingItem;