UNPKG

@atlaskit/dropdown-menu

Version:

A dropdown menu displays a list of actions or options to a user.

49 lines 1.74 kB
import React from 'react'; import SVGIcon from '@atlaskit/icon/svg'; import { fg } from '@atlaskit/platform-feature-flags'; import { B400, N10, N100 } from '@atlaskit/theme/colors'; /** * __Radio icon__ * * Used to visually represent the selected state in DropdownItemRadio * * @internal */ var RadioIcon = function RadioIcon(_ref) { var checked = _ref.checked; return /*#__PURE__*/React.createElement(SVGIcon, { label: "", size: "medium", primaryColor: checked ? "var(--ds-background-selected-bold, ".concat(B400, ")") : "var(--ds-background-input, ".concat(N10, ")"), secondaryColor: checked ? "var(--ds-icon-inverse, ".concat(N10, ")") : 'transparent' }, /*#__PURE__*/React.createElement("g", { fillRule: "evenodd" }, // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix fg('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("circle", { cx: "12", cy: "12", r: "7.5", fill: "currentColor", stroke: checked ? "var(--ds-border-selected, ".concat(B400, ")") : "var(--ds-border-input, ".concat(N100, ")"), strokeWidth: "1" }), /*#__PURE__*/React.createElement("circle", { cx: "12", cy: "12", r: "3", fill: "inherit" })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("circle", { fill: "currentColor", cx: "12", cy: "12", r: "6", stroke: checked ? "var(--ds-border-selected, ".concat(B400, ")") : "var(--ds-border-input, ".concat(N100, ")"), strokeWidth: 1 }), /*#__PURE__*/React.createElement("circle", { fill: "inherit", cx: "12", cy: "12", r: "2" })))); }; export default RadioIcon;