@atlaskit/side-navigation
Version:
A highly composable side navigation component that supports nested views.
41 lines (38 loc) • 1.87 kB
JavaScript
/* heading-item.tsx generated by @compiled/babel-plugin v3.0.2 */
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 MenuHeadingItem from '@atlaskit/menu/heading-item';
import { useShouldNestedElementRender } from '../NestableNavigationContent/use-should-nested-element-render';
var styles = {
headingItem: "_18zru2gc"
};
/**
* @deprecated `@atlaskit/side-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
/**
* __Heading item__
*
* Available for advanced use cases, for most situations providing a `title` to `section` should be enough.
*
* @deprecated `@atlaskit/side-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export var HeadingItem = function HeadingItem(props) {
var _useShouldNestedEleme = useShouldNestedElementRender(),
shouldRender = _useShouldNestedEleme.shouldRender;
if (!shouldRender) {
return null;
}
// @ts-expect-error - Although this isn't defined on props it is available because we've used
// spread props below and on the jsx element in MenuHeadingItem.
var UNSAFE_className = props.className;
return /*#__PURE__*/React.createElement(MenuHeadingItem
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props, @repo/internal/react/no-unsafe-overrides
, _extends({}, props, {
// @ts-expect-error
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides
className: ax([styles.headingItem, UNSAFE_className])
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides
}));
};