@atlaskit/side-navigation
Version:
A highly composable side navigation component that supports nested views.
53 lines (50 loc) • 2.33 kB
JavaScript
/* index.tsx generated by @compiled/babel-plugin v3.0.2 */
import _extends from "@babel/runtime/helpers/extends";
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { forwardRef } from 'react';
import warnOnce from '@atlaskit/ds-lib/warn-once';
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu/selection-style-context-do-not-use';
/**
* @deprecated `@atlaskit/side-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
var sidebarMinWidth = '240px';
var sideNavStyles = null;
/**
* __Side navigation__
*
* A highly composable side navigation component that supports nested views.
*
* - [Examples](https://atlassian.design/components/side-navigation/examples)
* - [Code](https://atlassian.design/components/side-navigation/code)
* - [Usage](https://atlassian.design/components/side-navigation/usage)
*
* @deprecated `@atlaskit/side-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export var SideNavigation = /*#__PURE__*/forwardRef(function (props, ref) {
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'CI') {
warnOnce('@atlaskit/side-navigation is deprecated. Use @atlaskit/navigation-system instead.');
}
var children = props.children,
testId = props.testId,
label = props.label,
_props$isServer = props.isServer,
isServer = _props$isServer === void 0 ? false : _props$isServer,
_props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
return /*#__PURE__*/React.createElement("nav", _extends({
ref: ref,
"data-testid": testId,
"aria-label": label,
"data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
}, isServer && isSSRPlaceholderEnabled && {
'data-ssr-placeholder': 'side-navigation-placeholder'
}, !isServer && isSSRPlaceholderEnabled && {
'data-ssr-placeholder-replace': 'side-navigation-placeholder'
}, {
className: ax(["_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _1ul9p3fh _4t3i1osq _kqswh2mm _2lx21bp4 _bfhkvuon _syazazsu"])
}), /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
value: "notch"
}, children));
});