@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian apps.
57 lines (55 loc) • 2.01 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["component", "isHighlighted", "isLoading", "onClick", "testId", "theme", "tooltip"];
/**
* @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';
var 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 var PrimaryDropdownButton = /*#__PURE__*/forwardRef(function (props, ref) {
var component = props.component,
isHighlighted = props.isHighlighted,
isLoading = props.isLoading,
onClick = props.onClick,
testId = props.testId,
theme = props.theme,
tooltip = props.tooltip,
rest = _objectWithoutProperties(props, _excluded);
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));
});