UNPKG

@atlaskit/logo

Version:

A logo is a visual representation of a brand or product. It can be a word or an image, or a combination of both.

68 lines (65 loc) 4.64 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.JiraSoftwareIcon = void 0; var _react = _interopRequireDefault(require("react")); var _useId = require("@atlaskit/ds-lib/use-id"); var _tokens = require("@atlaskit/tokens"); var _constants = require("../constants"); var _utils = require("../utils"); var _wrapper = _interopRequireDefault(require("../wrapper")); /* eslint-disable max-len */ var svg = function svg(_ref, colorMode, id) { var appearance = _ref.appearance, iconColor = _ref.iconColor; var colors = { iconGradientStart: _constants.legacyDefaultLogoParams.iconGradientStart, iconGradientStop: _constants.legacyDefaultLogoParams.iconGradientStart, iconColor: iconColor }; if (appearance) { colors = (0, _utils.getColorsFromAppearanceOldLogos)(appearance, colorMode); } return "\n <svg viewBox=\"0 0 32 32\" height=\"32\" xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\">\n <defs>\n <linearGradient x1=\"108.695%\" x2=\"12.439%\" y1=\"-14.936%\" y2=\"45.215%\" id=\"".concat(id, "-1\">\n <stop stop-color=\"").concat(colors.iconGradientStart, "\" ").concat(colors.iconGradientStart === 'inherit' ? 'stop-opacity="0.4"' : '', " offset=\"0%\"></stop>\n <stop stop-color=\"").concat(colors.iconGradientStop, "\" offset=\"100%\"></stop>\n </linearGradient>\n <linearGradient x1=\"0%\" x2=\"91.029%\" y1=\"118.55%\" y2=\"63.971%\" id=\"").concat(id, "-2\">\n <stop stop-color=\"").concat(colors.iconGradientStart, "\" ").concat(colors.iconGradientStart === 'inherit' ? 'stop-opacity="0.4"' : '', " offset=\"0%\"></stop>\n <stop stop-color=\"").concat(colors.iconGradientStop, "\" offset=\"100%\"></stop>\n </linearGradient>\n </defs>\n <g stroke=\"none\" stroke-width=\"1\" fill-rule=\"nonzero\">\n <path fill=\"").concat(colors.iconColor, "\" d=\"M15.9669691 29.3616152C17.2195568 28.1097726 17.9233158 26.4114623 17.9233158 24.6405626 17.9233158 22.8696629 17.2195568 21.1713527 15.9669691 19.91951L7.26805808 11.2489111 3.31143376 15.2055354C2.89743442 15.6200502 2.89743442 16.291565 3.31143376 16.7060799L15.9669691 29.3616152zM28.6225045 15.2055354L15.9669691 2.55 15.9280399 2.58892922C13.3485687 5.19994003 13.3612164 9.40374108 15.9563521 11.9991833L24.6623412 20.6662432 28.6225045 16.7060799C29.0365039 16.291565 29.0365039 15.6200502 28.6225045 15.2055354z\" />\n <path fill=\"url(#").concat(id, "-1\" d=\"M15.9669691,11.9921053 C13.3718335,9.39666304 13.3591857,5.19286199 15.938657,2.58185118 L6.91061706,11.6063521 L11.6316697,16.3274047 L15.9669691,11.9921053 Z\" />\n <path fill=\"url(#").concat(id, "-2\" d=\"M20.2951906,15.5912886 L15.9669691,19.91951 C17.2195568,21.1713527 17.9233158,22.8696629 17.9233158,24.6405626 C17.9233158,26.4114623 17.2195568,28.1097726 15.9669691,29.3616152 L25.0162432,20.3123412 L20.2951906,15.5912886 Z\" />\n </g>\n </svg>"); }; // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required /** * __Jira software icon__ * * The Jira Software icon without an accompanying wordmark. * * - [Examples](https://atlassian.design/components/logo/examples) * - [Code](https://atlassian.design/components/logo/code) * - [Usage](https://atlassian.design/components/logo/usage) * * @deprecated JiraSoftwareIcon is deprecated and will be removed from atlaskit/logo in the next major release. Please use JiraIcon. */ var JiraSoftwareIcon = exports.JiraSoftwareIcon = function JiraSoftwareIcon(_ref2) { var appearance = _ref2.appearance, _ref2$label = _ref2.label, label = _ref2$label === void 0 ? 'Jira Software' : _ref2$label, _ref2$size = _ref2.size, size = _ref2$size === void 0 ? _constants.defaultLogoParams.size : _ref2$size, testId = _ref2.testId, _ref2$iconColor = _ref2.iconColor, iconColor = _ref2$iconColor === void 0 ? _constants.defaultLogoParams.iconColor : _ref2$iconColor, _ref2$textColor = _ref2.textColor, textColor = _ref2$textColor === void 0 ? _constants.defaultLogoParams.textColor : _ref2$textColor; var _useThemeObserver = (0, _tokens.useThemeObserver)(), colorMode = _useThemeObserver.colorMode; var id = (0, _useId.useId)(); return /*#__PURE__*/_react.default.createElement(_wrapper.default, { appearance: appearance, label: label, svg: svg({ appearance: appearance, iconColor: iconColor }, colorMode, id), iconColor: iconColor, size: size, testId: testId, textColor: textColor }); };