UNPKG

@atlaskit/inline-message

Version:

An inline message lets users know when important information is available or when an action is required.

40 lines (39 loc) 1.31 kB
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */ import "./index.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { typesMapping } from '../../constants'; var iconColor = { connectivity: "_syaz1ft0", confirmation: "_syaz4pcx", info: "_syazqm1h", warning: "_syazervl", error: "_syazs4qr" }; var iconWrapperStyles = null; var iconColorStyles = null; /** * __Selected icon__ * * The selected icon is used as the primary interactive element for the dialog. * Can be used with or without supporting text. */ var SelectedIcon = function SelectedIcon(_ref) { var appearance = _ref.appearance, isOpen = _ref.isOpen, label = _ref.label, spacing = _ref.spacing; var _typesMapping$appeara = typesMapping[appearance], Icon = _typesMapping$appeara.icon, defaultLabel = _typesMapping$appeara.defaultLabel; return /*#__PURE__*/React.createElement("span", { "data-ds--inline-message--icon": true, className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _1e0c1txw _4cvr1h6o", iconColor[appearance], isOpen && "_syaz1kum"]) }, /*#__PURE__*/React.createElement(Icon, { testId: "inline-message-icon", label: label || defaultLabel, color: "currentColor", spacing: spacing })); }; export default SelectedIcon;