UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

33 lines (32 loc) • 1.8 kB
import React from 'react'; import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent'; type CreateButtonProps = { /** * The content of the button. */ children: React.ReactNode; /** * Handler called on click. You can use the second argument to fire Atlaskit analytics events on custom channels. * They could then be routed to GASv3 analytics. See the pressable or anchor primitive code examples for * information on [firing Atlaskit analytics events](https://atlassian.design/components/primitives/pressable/examples#atlaskit-analytics) * or [routing these to GASv3 analytics](https://atlassian.design/components/primitives/pressable/examples#gasv3-analytics). */ onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void; /** * A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests. */ testId?: string; /** * 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; }; /** * __Create button__ * * The create button for the top navigation. * With platform-dst-chat-panel-layout enabled, shows only its icon below the * enclosing TopNav's 48rem breakpoint. Children remain its accessible label. */ export declare const CreateButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<CreateButtonProps> & React.RefAttributes<HTMLButtonElement>>; export {};