@yandex/ui
Version:
Yandex UI components
24 lines (23 loc) • 1.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logoaas = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var Header_const_1 = require("../Header.const");
var Link_1 = require("../../Link/Link");
require("./Logoaas.css");
/**
* Компонент для отрисовки логотипа на основе logoaas
*
* @default "Яндекс"
* @see https://github.yandex-team.ru/soft/logoaas
* @param {LogoaasProps} props
*/
var Logoaas = function (_a) {
var _b = _a.size, size = _b === void 0 ? 32 : _b, _c = _a.color, color = _c === void 0 ? '000' : _c, _d = _a.first, first = _d === void 0 ? 'f00' : _d, _e = _a.tld, tld = _e === void 0 ? 'ru' : _e, _f = _a.circle, circle = _f === void 0 ? false : _f, href = _a.href, _g = _a.name, name = _g === void 0 ? 'Яндекс' : _g, className = _a.className, rest = tslib_1.__rest(_a, ["size", "color", "first", "tld", "circle", "href", "name", "className"]);
var baseUrl = href ? href : "//yandex." + tld;
var baseLogo = "//yastatic.net/q/logoaas/" + name + ".svg?size=" + size + "&color=" + color + "&first=" + first + "&circle=" + Number(circle);
return (react_1.default.createElement(Link_1.Link, tslib_1.__assign({}, rest, { className: Header_const_1.cnHeader('Logoaas', [className]), href: baseUrl, tabIndex: -1 }),
react_1.default.createElement("img", { className: Header_const_1.cnHeaderImage, src: baseLogo })));
};
exports.Logoaas = Logoaas;