@atlaskit/navigation-system
Version:
The latest navigation system for Atlassian apps.
38 lines (36 loc) • 1.39 kB
JavaScript
/* themed-link-button.tsx generated by @compiled/babel-plugin v3.0.2 */
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["iconBefore", "children"];
import "./themed-link-button.compiled.css";
import { ax, ix } from "@compiled/react/runtime";
import React from 'react';
import forwardRefWithGeneric from '@atlaskit/ds-lib/forward-ref-with-generic';
import { ThemedAnchor } from './themed-anchor';
var textButtonStyles = {
iconBefore: "_vwz4idpf",
text: "_k48p1wq8"
};
/**
* Props that are common between link buttons.
*/
function ThemedLinkButtonFn(_ref, ref) {
var IconBefore = _ref.iconBefore,
children = _ref.children,
props = _objectWithoutProperties(_ref, _excluded);
return (
/*#__PURE__*/
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
React.createElement(ThemedAnchor, _extends({}, props, {
ref: ref
}), IconBefore && /*#__PURE__*/React.createElement("span", {
className: ax([textButtonStyles.iconBefore])
}, /*#__PURE__*/React.createElement(IconBefore, {
label: "",
color: "currentColor"
})), /*#__PURE__*/React.createElement("span", {
className: ax([textButtonStyles.text])
}, children))
);
}
export var ThemedLinkButton = forwardRefWithGeneric(ThemedLinkButtonFn);