UNPKG

@openpass/openpass-js-sdk

Version:
46 lines 4.49 kB
import { logoSizes } from "./styles"; const getLogoDimensionFromButtonSize = (size) => { switch (size) { case "x-large": return logoSizes.xLarge; case "large": return logoSizes.large; case "medium": return logoSizes.medium; case "small": return logoSizes.small; } }; export const getGreenWhiteSvg = (size) => { const logoDimension = getLogoDimensionFromButtonSize(size); const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); svg.setAttribute("role", "img"); svg.setAttribute("title", "OpenPass Logo"); svg.setAttribute("fill", "none"); svg.setAttribute("width", `${logoDimension}`); svg.setAttribute("height", `${logoDimension}`); svg.setAttribute("viewBox", `5 4 40 40`); svg.setAttribute("xmlns", "http://www.w3.org/2000/svg"); svg.innerHTML = ` <path d="M21.97 44c.95 0 1.87-.09 2.78-.26l.37-.08.12-.03.23-.05.19-.05.15-.04.23-.06.11-.03.24-.07.1-.03.25-.08c.03 0 .05-.02.08-.03a4.7 4.7 0 0 0 .33-.12l.28-.1h.02a17.05 17.05 0 0 0 1.51-.7h.02l.27-.14.03-.01.26-.15a.21.21 0 0 0 .05-.03l.23-.14a.2.2 0 0 0 .06-.04l.24-.14.03-.02c.37-.24.74-.5 1.09-.76l.24-.18.02-.02.22-.18c.02 0 .03-.03.05-.04l.2-.17.07-.05.2-.18.05-.04c.41-.37.8-.77 1.2-1.18a23.3 23.3 0 0 0 2.63-3.61c-.02.02.01-.02 0 0-.02.03 0 .02 0 0 .22-.39.41-.77.6-1.17l.54-1.23c-.01.01 0 0 0 0 1.1-2.7 1.58-5.65 1.58-8.56 0-7.58-5.53-15.41-14.35-13.13 5.05 1.45 8.8 6.77 8.8 13.13 0 6.35-3.74 11.7-8.8 13.15-8.13 1.57-14.32-4.59-14.32-13.47 0-5.73 1.81-11.28 6.19-15.13.5-.4.95-.85 1.47-1.24l.23-.17.08-.06.17-.11.03-.02.12-.08.13-.09.04-.03.15-.1.1-.07.2-.12.34-.2.32-.19c.03 0 .05-.03.08-.04.05-.01.09-.04.14-.06l.07-.04a3.02 3.02 0 0 1 .28-.15l.1-.06.42-.2.1-.03.1-.05c.02 0 .04-.02.05-.03l.08-.04.27-.12.36-.14c.17-.07.34-.12.51-.17l.67-.22.64-.18c1.32-.3 2.53-.77 3.9-.77h-5.55C12.51 4 4.84 12.96 4.84 24s7.67 20 17.12 20h.01Z" fill="#00A997"/> <path d="M27.82 44c9.4 0 17.02-8.95 17.02-20S37.22 4 27.82 4c-3.4 0-6.86 1.43-9.59 3.45-.8.66-1.55 1.36-2.24 2.15a21.2 21.2 0 0 0-5.09 12.6 25 25 0 0 0-.06 1.73c0 7.47 5.04 15.01 14.25 13.1-5.02-1.44-8.75-6.77-8.75-13.12 0-6.59 4.64-13.52 11.52-13.52 6.3 0 10 5.06 11.08 9.88.45 2.03.51 4.1.29 6.16-.07.66-.16 1.33-.29 1.98a20.25 20.25 0 0 1-8.71 13.27c-1.6.9-3.25 1.6-5.05 1.95-.9.17-1.82.37-2.76.37h5.4Z" fill="#fff"/> `; return svg; }; export const getGreenBlueSvg = (size) => { const logoDimension = getLogoDimensionFromButtonSize(size); const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); svg.setAttribute("role", "img"); svg.setAttribute("title", "OpenPass Logo"); svg.setAttribute("fill", "none"); svg.setAttribute("width", `${logoDimension}`); svg.setAttribute("height", `${logoDimension}`); svg.setAttribute("viewBox", `5 4 40 40`); svg.setAttribute("xmlns", "http://www.w3.org/2000/svg"); svg.innerHTML = ` <path d="M21.97 44c.95 0 1.87-.09 2.78-.26l.37-.08.12-.03.23-.05.19-.05.15-.04.23-.06.11-.03.24-.07.1-.03.25-.08c.03 0 .05-.02.08-.03a4.7 4.7 0 0 0 .33-.12l.28-.1h.02a17.05 17.05 0 0 0 1.51-.7h.02l.27-.14.03-.01.26-.15a.21.21 0 0 0 .05-.03l.23-.14a.2.2 0 0 0 .06-.04l.24-.14.03-.02c.37-.24.74-.5 1.09-.76l.24-.18.02-.02.22-.18c.02 0 .03-.03.05-.04l.2-.17.07-.05.2-.18.05-.04c.41-.37.8-.77 1.2-1.18a23.3 23.3 0 0 0 2.63-3.61c-.02.02.01-.02 0 0-.02.03 0 .02 0 0 .22-.39.41-.77.6-1.17l.54-1.23c-.01.01 0 0 0 0 1.1-2.7 1.58-5.65 1.58-8.56 0-7.58-5.53-15.41-14.35-13.13 5.05 1.45 8.8 6.77 8.8 13.13 0 6.35-3.74 11.7-8.8 13.15-8.13 1.57-14.32-4.59-14.32-13.47 0-5.73 1.81-11.28 6.19-15.13.5-.4.95-.85 1.47-1.24l.23-.17.08-.06.17-.11.03-.02.12-.08.13-.09.04-.03.15-.1.1-.07.2-.12.34-.2.32-.19c.03 0 .05-.03.08-.04.05-.01.09-.04.14-.06l.07-.04a3.02 3.02 0 0 1 .28-.15l.1-.06.42-.2.1-.03.1-.05c.02 0 .04-.02.05-.03l.08-.04.27-.12.36-.14c.17-.07.34-.12.51-.17l.67-.22.64-.18c1.32-.3 2.53-.77 3.9-.77h-5.55C12.51 4 4.84 12.96 4.84 24s7.67 20 17.12 20h.01Z" fill="#00A997"/> <path d="M27.82 44c9.4 0 17.02-8.95 17.02-20S37.22 4 27.82 4c-3.4 0-6.86 1.43-9.59 3.45-.8.66-1.55 1.36-2.24 2.15a21.2 21.2 0 0 0-5.09 12.6 25 25 0 0 0-.06 1.73c0 7.47 5.04 15.01 14.25 13.1-5.02-1.44-8.75-6.77-8.75-13.12 0-6.59 4.64-13.52 11.52-13.52 6.3 0 10 5.06 11.08 9.88.45 2.03.51 4.1.29 6.16-.07.66-.16 1.33-.29 1.98a20.25 20.25 0 0 1-8.71 13.27c-1.6.9-3.25 1.6-5.05 1.95-.9.17-1.82.37-2.76.37h5.4Z" fill="#030A40"/> `; return svg; }; //# sourceMappingURL=logos.js.map