@atlaskit/rovo-agent-components
Version:
This package host public components related to rovo agents, the components here are needed for other public atlaskit packages
38 lines • 1.39 kB
JavaScript
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
import _extends from "@babel/runtime/helpers/extends";
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { useIntl } from 'react-intl';
import { IconButton } from '@atlaskit/button/new';
import { cx } from '@atlaskit/css';
import LinkIcon from '@atlaskit/icon/core/link';
import { Box } from '@atlaskit/primitives/compiled';
import messages from './messages';
var styles = {
hidden: "_tzy4idpf"
};
export var LinkIconButton = function LinkIconButton(_ref) {
var handleCopy = _ref.handleCopy,
_ref$visible = _ref.visible,
visible = _ref$visible === void 0 ? true : _ref$visible,
agentName = _ref.agentName;
var _useIntl = useIntl(),
formatMessage = _useIntl.formatMessage;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
xcss: cx(!visible && styles.hidden)
}, /*#__PURE__*/React.createElement(IconButton, {
type: "button",
onClick: handleCopy,
icon: function icon(iconProps) {
return /*#__PURE__*/React.createElement(LinkIcon, _extends({}, iconProps, {
color: "var(--ds-icon, #292A2E)"
}));
},
appearance: "subtle",
spacing: "compact",
label: formatMessage(messages.copyAgentLinkLabel, {
agentName: agentName
})
})));
};