@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian apps.
57 lines (55 loc) • 1.68 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
/**
* @jsxRuntime classic
* @jsx jsx
*/
import { forwardRef } from 'react';
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
import { css, jsx } from '@emotion/react';
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
import { PrimaryButton } from '../PrimaryButton';
const buttonNoOpStyle = css({
'--noop': 1
});
/**
* __Primary dropdown button__
*
* A primary dropdown button allows you to add dropdown menus to the navigation.
* Should be passed into `AtlassianNavigation`'s `primaryItems` prop.
*
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
*
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export const PrimaryDropdownButton = /*#__PURE__*/forwardRef((props, ref) => {
const {
component,
isHighlighted,
isLoading,
onClick,
testId,
theme,
tooltip,
...rest
} = props;
return jsx(PrimaryButton, _extends({
component: component,
iconAfter: jsx(ChevronDownIcon, {
color: "currentColor",
label: "",
size: "small"
}),
isHighlighted: isHighlighted,
isLoading: isLoading,
onClick: onClick,
ref: ref,
testId: testId
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
,
theme: theme,
tooltip: tooltip,
css: [buttonNoOpStyle] // Typescript working for css mismatch error
// These are all explicit, leaving it in just in case
}, rest));
});