UNPKG

@atlaskit/rovo-agent-components

Version:

This package host public components related to rovo agents, the components here are needed for other public atlaskit packages

46 lines 2.07 kB
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */ import "./index.compiled.css"; import { ax, ix } from "@compiled/react/runtime"; import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql"; import React from 'react'; import { useIntl } from 'react-intl'; import { graphql, useFragment } from 'react-relay'; import { cx } from '@atlaskit/css'; import VerifiedIcon from '@atlaskit/icon/core/status-verified'; import { Flex } from '@atlaskit/primitives/compiled'; import Tooltip from '@atlaskit/tooltip'; import messages from './messages'; export var AgentVerified = function AgentVerified(_ref) { var agentRef = _ref.agentRef, adjacentTextSize = _ref.adjacentTextSize; var data = useFragment(_agentVerified_AtlaskitRovoAgentComponents, agentRef); if (!(data !== null && data !== void 0 && data.isVerified)) { return null; } return /*#__PURE__*/React.createElement(AgentVerifiedIcon, { adjacentTextSize: adjacentTextSize }); }; var styles = { body: "_4t3igktf", textLarge: "_4t3i1tcg", headingMedium: "_4t3i1tcg", headingLarge: "_4t3i1f4h" }; export var AgentVerifiedIcon = function AgentVerifiedIcon(_ref2) { var _ref2$adjacentTextSiz = _ref2.adjacentTextSize, adjacentTextSize = _ref2$adjacentTextSiz === void 0 ? 'body' : _ref2$adjacentTextSiz; var _useIntl = useIntl(), formatMessage = _useIntl.formatMessage; return /*#__PURE__*/React.createElement(Tooltip, { content: formatMessage(messages.verifiedAgentTooltip) }, /*#__PURE__*/React.createElement(Flex, { justifyContent: "center", alignItems: "center", xcss: cx(adjacentTextSize === 'body' && styles['body'], adjacentTextSize === 'headingMedium' && styles['headingMedium'], adjacentTextSize === 'headingLarge' && styles['headingLarge'], adjacentTextSize === 'textLarge' && styles['textLarge']) }, /*#__PURE__*/React.createElement(VerifiedIcon, { color: "var(--ds-icon-accent-blue, #357DE8)", label: formatMessage(messages.verifiedIconLabel), size: "small" }))); };