@atlaskit/atlassian-navigation
Version:
A horizontal navigation component for Atlassian apps.
71 lines (70 loc) • 2.59 kB
JavaScript
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
import "./index.compiled.css";
import { ax, ix } from "@compiled/react/runtime";
import React, { forwardRef } from 'react';
import SettingsIcon from '@atlaskit/icon/core/settings';
import { Flex } from '@atlaskit/primitives/compiled';
import { IconButton } from '../IconButton';
var iconSpacingStyles = {
space050: "_1rjc1b66 _18zr1b66"
};
/**
* __Settings__
*
* A settings button that can be passed into `AtlassianNavigation`'s `renderSettings` prop.
*
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#settings)
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
*
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export var Settings = /*#__PURE__*/forwardRef(function (props, ref) {
var component = props.component,
href = props.href,
id = props.id,
isDisabled = props.isDisabled,
isSelected = props.isSelected,
label = props.label,
onBlur = props.onBlur,
onClick = props.onClick,
onFocus = props.onFocus,
onMouseDown = props.onMouseDown,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onMouseUp = props.onMouseUp,
target = props.target,
testId = props.testId,
tooltip = props.tooltip,
rest = _objectWithoutProperties(props, _excluded);
return /*#__PURE__*/React.createElement("div", {
role: "listitem"
}, /*#__PURE__*/React.createElement(IconButton, _extends({
component: component,
href: href,
icon: /*#__PURE__*/React.createElement(Flex, {
xcss: iconSpacingStyles.space050
}, /*#__PURE__*/React.createElement(SettingsIcon, {
color: "currentColor",
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
})),
id: id,
isDisabled: isDisabled,
isSelected: isSelected,
label: label,
onBlur: onBlur,
onClick: onClick,
onFocus: onFocus,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp,
ref: ref,
target: target,
testId: testId,
tooltip: tooltip,
isTooltipAnnouncementDisabled: true
}, rest)));
});