-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStackOverflowLogo.tsx
More file actions
27 lines (23 loc) · 2.92 KB
/
Copy pathStackOverflowLogo.tsx
File metadata and controls
27 lines (23 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
interface StackOverflowLogoProps {
className?: string;
variant?: "full" | "glyph";
}
const FULL_LOGO_PATH =
"M18.52 9.69q-1.43 1.07-2.52 2.48l.03.01v.01l-.03-.02a14 14 0 0 0-1.77 2.99l-.02.05a13 13 0 0 0-.93 3.32v.02q-.13.92-.13 1.88c0 .55.07 1.04.13 1.57H0v-3.47h11.5l.07-.43L.5 15.16l.93-3.4 11.21 2.98.16-.34L2.72 8.66 4.5 5.6l10.22 5.83.25-.29L6.6 2.89 9.12.4zM28.9 5.78c3.3 0 5.98 2.15 5.98 5.24h-2.96c-.13-1.67-1.09-2.66-3.11-2.66-2.03 0-3.04.81-3.04 1.95 0 3.42 9.34.33 9.34 6.58 0 2.89-2.28 4.51-6.13 4.51-3.57 0-6.22-2.25-6.33-5.27h3c.14 1.7 1.59 2.71 3.48 2.71 1.78 0 3.07-.68 3.07-1.95 0-3.14-9.37-.28-9.37-6.58 0-2.45 2.33-4.53 6.08-4.53m20.15 2.58c1.75 0 2.96.7 3.75 1.95V8.7h2.76V21H52.8v-1.53c-.74 1.2-1.93 1.93-3.75 1.93-3.44 0-5.55-2.69-5.55-6.5 0-3.83 2.1-6.54 5.55-6.54m.43 2.48c-2.02 0-3.14 1.7-3.14 4.05 0 2.33 1.12 4 3.14 4 2.23 0 3.32-1.72 3.32-4s-1.1-4.05-3.32-4.05m13.78-2.48c3.37 0 5.73 2.48 5.75 5.2h-2.89c-.07-1.35-.88-2.7-2.86-2.7-2.4 0-3.44 1.75-3.44 4.03s1.04 3.98 3.44 3.98c2.06 0 2.87-1.45 2.94-3h2.86c-.05 3.2-2.3 5.53-5.8 5.53-3.8 0-6.27-2.69-6.27-6.5 0-3.83 2.48-6.54 6.27-6.54m28.26-2.58c4.91 0 7.6 3.57 7.6 7.8 0 4.22-2.71 7.82-7.6 7.82s-7.62-3.55-7.62-7.82c0-4.23 2.7-7.8 7.62-7.8m0 2.58c-3.22 0-4.68 2.68-4.68 5.22s1.44 5.24 4.68 5.24 4.6-2.71 4.6-5.24-1.38-5.22-4.6-5.22m25.93 0c3.34 0 6.2 2.7 5.6 7.44h-9c.23 1.8 1.3 3.1 3.4 3.1 1.44 0 2.35-.89 2.73-1.9h2.89a5.5 5.5 0 0 1-5.62 4.4c-3.83 0-6.3-2.69-6.3-6.5 0-3.83 2.47-6.54 6.3-6.54m0 2.48c-1.93 0-2.97 1.11-3.35 2.68h6.23c-.15-1.46-1.06-2.68-2.88-2.68m33.42-2.48c3.8 0 6.28 2.7 6.28 6.53 0 3.82-2.49 6.5-6.28 6.5s-6.3-2.68-6.3-6.5 2.47-6.53 6.3-6.53m0 2.48c-2.3 0-3.47 1.77-3.47 4.05 0 2.33 1.16 4 3.47 4 2.3 0 3.47-1.67 3.47-4s-1.17-4.05-3.47-4.05M40.5 8.71h2.1v2.36h-2.1v7.62h2.46V21h-5.22v-9.93H36V8.7h1.74V6h2.76zm32.69 4.94 3.97-4.94h3.27l-4 4.97 4.4 7.32h-3.08l-2.99-5.3-1.57 1.98V21H70.4V6h2.79zm32.15 4.91 2.79-9.85h2.96L107.24 21h-3.77L99.62 8.71h2.96zm25.88-9.85V11h-3.97v10h-2.76V8.71zm7.98-4.17v2.35h-1.78q-1.18.01-1.19 1.09v.73h2.71V11h-2.7v10h-2.77V11h-1.26V8.71h1.26v-.73c0-2.2 1.27-3.44 3.93-3.44zm3.97 0V21h-2.78V4.54zm18.97 13.42 2.05-9.25h3l2.06 9.27 1.82-9.27h2.94L171.05 21h-3.67l-1.67-7.5-1.67 7.5h-3.67L157.4 8.71h2.96z";
const GLYPH_PATH =
"m22.18 16.32.05.02-.02.01za19 19 0 0 0-2.45 4.14l-.03.07q-.94 2.19-1.29 4.6v.03a18 18 0 0 0-.05 4.85H.01v-4.88h15.94l.1-.6L.69 20.48l1.28-4.7 15.55 4.1.22-.46-13.96-7.96 2.47-4.22 14.16 8.07.34-.4L9.15 3.47 12.65 0l11.78 11.64 1.25 1.23q-1.97 1.5-3.5 3.44";
export function StackOverflowLogo({ className, variant = "full" }: StackOverflowLogoProps) {
const isFullLogo = variant === "full";
return (
<svg
aria-hidden="true"
className={className}
focusable="false"
height={isFullLogo ? 22 : 31}
viewBox={isFullLogo ? "0 0 175 22" : "0 0 26 31"}
width={isFullLogo ? 175 : 26}
>
<path d={isFullLogo ? FULL_LOGO_PATH : GLYPH_PATH} fill="currentColor" />
</svg>
);
}