@yandex/ui
Version:
Yandex UI components
16 lines (15 loc) • 793 B
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { cnHeader, cnHeaderLogo } from '../Header.const';
import { Link } from '../../Link/Link';
import './Header-Logo.css';
/**
* Базовый логотип Яндекс для шапки.
* @param {YandexLogoProps} props
*
*/
export var YandexLogo = function (_a) {
var _b = _a.circle, circle = _b === void 0 ? false : _b, _c = _a.tld, tld = _c === void 0 ? 'ru' : _c, _d = _a.lang, lang = _d === void 0 ? 'ru' : _d, href = _a.href, rest = __rest(_a, ["circle", "tld", "lang", "href"]);
var url = href ? href : "//yandex." + tld;
return React.createElement(Link, __assign({}, rest, { className: cnHeader('Logo', { circle: Boolean(circle), lang: lang }, [cnHeaderLogo]), href: url, tabIndex: -1 }));
};