UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

52 lines (50 loc) 1.33 kB
import { cdnUrl } from "../core/consts.js"; import { cs } from "../utils/styles.js"; import vui from "../core/vui.js"; import { Box } from "../box/box.js"; import { Svg } from "../svg/svg.js"; import { jsx } from "react/jsx-runtime"; //#region src/logo/Logo.tsx const veracityLogo = `${cdnUrl}/common/icons/logos/veracity-logo.svg`; const dnvLogo = `${cdnUrl}/common/icons/logos/dnv-logo.svg`; const veracityLogoWidth = 115; const dnvLogoWidth = 93.66; /** Brand logo. */ const Logo = vui((props, ref) => { const { brand, children, className, src, styles, url, w, ...rest } = props; let svgSrc = src; let width = w; if (!svgSrc) { svgSrc = brand === "dnv" ? dnvLogo : veracityLogo; width = brand === "dnv" ? dnvLogoWidth : veracityLogoWidth; } const linkProps = url ? { as: "a", href: url, outline: "none", focusRing: 2 } : {}; return /* @__PURE__ */ jsx(Box, { centerV: true, className: cs("vui-logo", className), flexShrink: 0, h: 40, mr: 2, ref, w: width, ...styles?.container, ...linkProps, ...rest, children: children ?? /* @__PURE__ */ jsx(Svg, { "aria-label": "logo", h: "100%", src: svgSrc, ...styles?.svg }) }); }); Logo.displayName = "Logo"; //#endregion export { Logo, Logo as default }; globalThis.__vuiVersion__ = "5.3.1" //# sourceMappingURL=Logo.js.map