@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian apps.
52 lines • 1.35 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import React, { forwardRef } from 'react';
import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
import { IconButton } from '../IconButton';
/**
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export const AppSwitcherNav4 = /*#__PURE__*/forwardRef((props, ref) => {
const {
component,
href,
id,
isDisabled,
isSelected,
label,
onBlur,
onClick,
onFocus,
onMouseDown,
onMouseEnter,
onMouseLeave,
onMouseUp,
target,
testId,
tooltip,
...rest
} = props;
return /*#__PURE__*/React.createElement(IconButton, _extends({
icon: /*#__PURE__*/React.createElement(AppSwitcherIcon, {
label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
color: "var(--ds-icon, #292A2E)"
}),
component: component,
href: href,
id: id,
isDisabled: isDisabled,
isSelected: isSelected,
label: label,
onBlur: onBlur,
onClick: onClick,
onFocus: onFocus,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp,
ref: ref,
target: target,
testId: testId,
tooltip: tooltip
// These are all explicit, leaving it in just in case
}, rest));
});