@atlaskit/navigation-system
Version:
The latest navigation system for Atlassian apps.
43 lines (42 loc) • 1.85 kB
TypeScript
import React from 'react';
import type { IconButtonProps } from '@atlaskit/button/icon/button';
import type { TriggerProps } from '@atlaskit/popup/types';
interface AppSwitcherProps extends Partial<Omit<TriggerProps, 'ref' | 'data-ds--level'>> {
/**
* Provide an accessible label, often used by screen readers.
*/
label: React.ReactNode;
/**
* Allows a custom visual to be used instead of the Atlassian AppSwitcher icon.
* Defaults to the Atlassian app switcher icon.
*/
icon?: IconButtonProps['icon'];
/**
* Handler called on click.
*/
onClick?: React.MouseEventHandler<HTMLButtonElement>;
/**
* Called when the mouse enters the element container.
* Allows preloading popup components
*/
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
/**
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
*/
interactionName?: string;
/**
* Indicates that the button is selected.
*/
isSelected?: boolean;
/**
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
*/
testId?: string;
}
/**
* __App switcher__
*
* The trigger button for the app switcher. Allows users to switch between Atlassian products.
*/
export declare const AppSwitcher: React.ForwardRefExoticComponent<React.PropsWithoutRef<AppSwitcherProps> & React.RefAttributes<HTMLButtonElement>>;
export {};