UNPKG

@atlaskit/icon

Version:

An icon is a symbol representing a command, device, directory, or common action.

55 lines (52 loc) 2.54 kB
/* svg.tsx generated by @compiled/babel-plugin v0.36.1 */ "use strict"; var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; require("./svg.compiled.css"); var _react = _interopRequireWildcard(require("react")); var React = _react; var _runtime = require("@compiled/react/runtime"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } var sizeStyles = { small: "_1bsb7vkz _4t3i7vkz", medium: "_1bsb1tcg _4t3i1tcg", large: "_1bsbzwfg _4t3izwfg", xlarge: "_1bsbckbl _4t3ickbl" }; var svgStyles = null; /** * __SVG__ * * An icon is used as a visual representation of common actions and commands to provide context. * * - [Examples](https://atlaskit.atlassian.com/packages/design-system/icon) * - [Code](https://atlaskit.atlassian.com/packages/design-system/icon/docs/custom-svgs) */ var SVG = /*#__PURE__*/(0, _react.memo)(function SVG(_ref) { var _ref$size = _ref.size, size = _ref$size === void 0 ? 'medium' : _ref$size, label = _ref.label, _ref$primaryColor = _ref.primaryColor, primaryColor = _ref$primaryColor === void 0 ? 'currentColor' : _ref$primaryColor, secondaryColor = _ref.secondaryColor, testId = _ref.testId, children = _ref.children; return /*#__PURE__*/React.createElement("svg", { viewBox: "0 0 24 24", style: { color: primaryColor, // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766 fill: secondaryColor } // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766 , "data-testid": testId, "aria-label": label || undefined, role: label ? 'img' : 'presentation', className: (0, _runtime.ax)(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw _vc881r31", sizeStyles[size]]) }, children); }); var _default = exports.default = SVG;