@atlaskit/dropdown-menu
Version:
A dropdown menu displays a list of actions or options to a user.
50 lines • 1.64 kB
JavaScript
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
*/
const RadioIcon = ({
checked
}) => {
return /*#__PURE__*/React.createElement(SVGIcon, {
label: "",
size: "medium",
primaryColor: checked ? `var(--ds-background-selected-bold, ${B400})` : `var(--ds-background-input, ${N10})`,
secondaryColor: checked ? `var(--ds-icon-inverse, ${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, ${B400})` : `var(--ds-border-input, ${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, ${B400})` : `var(--ds-border-input, ${N100})`,
strokeWidth: 1
}), /*#__PURE__*/React.createElement("circle", {
fill: "inherit",
cx: "12",
cy: "12",
r: "2"
}))));
};
export default RadioIcon;