UNPKG

@atlaskit/inline-message

Version:

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

44 lines (43 loc) 1.17 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'; const iconColor = { connectivity: "_syaz1ft0", confirmation: "_syaz4pcx", info: "_syazqm1h", warning: "_syazervl", error: "_syazs4qr" }; const iconWrapperStyles = null; const 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. */ const SelectedIcon = ({ appearance, isOpen, label, spacing }) => { const { [appearance]: { icon: Icon, defaultLabel } } = typesMapping; 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;