UNPKG

@atlaskit/side-navigation

Version:

A highly composable side navigation component that supports nested views.

53 lines (50 loc) • 2.09 kB
/* 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. */ const sidebarMinWidth = '240px'; const 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 const SideNavigation = /*#__PURE__*/forwardRef((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.'); } const { children, testId, label, isServer = false, isSSRPlaceholderEnabled = false } = props; return /*#__PURE__*/React.createElement("nav", _extends({ ref: ref, "data-testid": testId, "aria-label": label, "data-vc": `side-navigation${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)); });