@atlaskit/rovo-agent-components
Version:
This package host public components related to rovo agents, the components here are needed for other public atlaskit packages
58 lines • 2.19 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 { forwardRef } from 'react';
import { useIntl } from 'react-intl';
import { cx } from '@atlaskit/css';
import AgentIcon from '@atlaskit/icon/core/ai-agent';
import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
import { ChatPillIcon } from '../chat-icon';
import messages from './messages';
const stylesCompiled = {
pillLineHeight: "_vwz47vkz"
};
const styles = {
button: "_2rko12b0 _11c8fhey _189ee4h9 _1dqonqa1 _1h6d1l7x _syazazsu _ca0q12x7 _u5f3utpp _n3td12x7 _19bvutpp _k48p1wq8 _1bto1l2s _o5721q9c _1o9zkb7n _bfhksm61 _irr31dpa _1di6fcek",
buttonInline: "_18zrv77o",
queryText: "_1nmz1hna _y3gn1e5h",
whiteSpacePreWrap: "_o5721jtm"
};
export const ChatPill = /*#__PURE__*/forwardRef(({
children,
whiteSpacePreWrap = true,
renderIcon = true,
...props
}, ref) => /*#__PURE__*/React.createElement(Pressable, _extends({
ref: ref
}, props, {
xcss: styles.button
}), /*#__PURE__*/React.createElement("div", {
className: ax([stylesCompiled.pillLineHeight])
}, /*#__PURE__*/React.createElement(Inline, {
space: "space.075",
alignBlock: "baseline"
}, renderIcon ? /*#__PURE__*/React.createElement(ChatPillIcon, null) : null, /*#__PURE__*/React.createElement(Box, {
xcss: cx(styles.queryText, whiteSpacePreWrap && styles.whiteSpacePreWrap)
}, children)))));
export const BrowseAgentsPill = /*#__PURE__*/forwardRef((props, ref) => {
const {
formatMessage
} = useIntl();
return /*#__PURE__*/React.createElement(Pressable, _extends({
ref: ref
}, props, {
xcss: styles.button
}), /*#__PURE__*/React.createElement("div", {
className: ax([stylesCompiled.pillLineHeight])
}, /*#__PURE__*/React.createElement(Inline, {
space: "space.050",
xcss: styles.buttonInline
}, /*#__PURE__*/React.createElement(AgentIcon, {
color: "currentColor",
label: ""
}), /*#__PURE__*/React.createElement(Box, {
xcss: styles.queryText
}, formatMessage(messages.browseAgentsPillLabel)))));
});