UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

37 lines (35 loc) • 1.19 kB
/* themed-link-button.tsx generated by @compiled/babel-plugin v3.0.2 */ import _extends from "@babel/runtime/helpers/extends"; 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'; const textButtonStyles = { iconBefore: "_vwz4idpf", text: "_k48p1wq8" }; /** * Props that are common between link buttons. */ function ThemedLinkButtonFn({ iconBefore: IconBefore, children, ...props }, ref) { 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 const ThemedLinkButton = forwardRefWithGeneric(ThemedLinkButtonFn);