@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian apps.
52 lines • 1.94 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
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 var AppSwitcherNav4 = /*#__PURE__*/forwardRef(function (props, ref) {
var component = props.component,
href = props.href,
id = props.id,
isDisabled = props.isDisabled,
isSelected = props.isSelected,
label = props.label,
onBlur = props.onBlur,
onClick = props.onClick,
onFocus = props.onFocus,
onMouseDown = props.onMouseDown,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onMouseUp = props.onMouseUp,
target = props.target,
testId = props.testId,
tooltip = props.tooltip,
rest = _objectWithoutProperties(props, _excluded);
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));
});