@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.
63 lines (60 loc) • 2.75 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.OpsgenieIcon = void 0;
var _react = _interopRequireDefault(require("react"));
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) {
var appearance = _ref.appearance,
iconColor = _ref.iconColor;
var colors = {
iconColor: iconColor
};
if (appearance) {
colors = (0, _utils.getColorsFromAppearance)(appearance, colorMode);
}
return "<svg fill=\"none\" height=\"32\" viewBox=\"0 0 32 32\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"".concat(colors.iconColor, "\" d=\"M17.114 28.127c-.785.578-1.199.537-1.984-.041-3.8-2.727-7.313-5.826-9.668-9.049-.248-.33-.124-.785.248-.991l4.297-2.686q.558-.372.992.124c1.652 1.9 3.264 3.76 5.123 5.082 1.86-1.322 3.47-3.181 5.123-5.082q.434-.495.992-.124l4.297 2.686c.372.206.496.66.248.991-2.355 3.223-5.867 6.322-9.668 9.09m-.992-11.858c3.388 0 6.198-2.768 6.198-6.156s-2.81-6.239-6.198-6.239-6.198 2.81-6.198 6.239c0 3.43 2.727 6.156 6.198 6.156\"/>\n </svg>");
};
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
/**
* __Opsgenie icon__
*
* The Opsgenie 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)
*
*/
var OpsgenieIcon = exports.OpsgenieIcon = function OpsgenieIcon(_ref2) {
var appearance = _ref2.appearance,
_ref2$label = _ref2.label,
label = _ref2$label === void 0 ? 'Opsgenie' : _ref2$label,
_ref2$size = _ref2.size,
size = _ref2$size === void 0 ? _constants.defaultLogoParams.size : _ref2$size,
testId = _ref2.testId,
_ref2$textColor = _ref2.textColor,
textColor = _ref2$textColor === void 0 ? _constants.defaultLogoParams.textColor : _ref2$textColor,
_ref2$iconColor = _ref2.iconColor,
iconColor = _ref2$iconColor === void 0 ? _constants.defaultLogoParams.iconColor : _ref2$iconColor;
var _useThemeObserver = (0, _tokens.useThemeObserver)(),
colorMode = _useThemeObserver.colorMode;
return /*#__PURE__*/_react.default.createElement(_wrapper.default, {
appearance: appearance,
svg: svg({
appearance: appearance,
iconColor: iconColor
}, colorMode),
iconColor: iconColor,
label: label,
size: size,
testId: testId,
textColor: textColor
});
};