@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian products.
30 lines (29 loc) • 1.03 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import React, { forwardRef } from 'react';
import AppSwitcherIcon from '@atlaskit/icon/glyph/app-switcher';
import { IconButton } from '../IconButton';
/**
* _App switcher__
*
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
* `renderAppSwitcher` prop.
*
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
*/
export const AppSwitcher = /*#__PURE__*/forwardRef((props, ref) => {
const {
tooltip,
...iconButtonProps
} = props;
return /*#__PURE__*/React.createElement(IconButton, _extends({
icon: /*#__PURE__*/React.createElement(AppSwitcherIcon, {
label: typeof tooltip === 'string' ? tooltip : 'Appswitcher Icon'
}),
tooltip: tooltip,
ref: ref
}, iconButtonProps));
});
// exists only to extract props
// eslint-disable-next-line @repo/internal/react/use-noop
export default (props => {});