UNPKG

@atlaskit/menu

Version:

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

41 lines (40 loc) 1.42 kB
/* heading-item.tsx generated by @compiled/babel-plugin v0.36.1 */ 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 { N300 } from '@atlaskit/theme/colors'; const headingStyles = null; /** * __Heading item__ * * 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(["_11c81vhk _1rjcze3t _18zrpxbi _syaz1n3s", UNSAFE_className]) }, rest), children); }); export default HeadingItem;