MCPcopy Create free account
hub / github.com/pingdotgg/t3code / SourceControlIcon

Function SourceControlIcon

apps/mobile/src/components/SourceControlIcon.tsx:5–99  ·  view source on GitHub ↗
(props: {
  readonly kind: SourceControlIconKind;
  readonly size?: number;
  readonly color?: string;
})

Source from the content-addressed store, hash-verified

3export type SourceControlIconKind = "github" | "gitlab" | "bitbucket" | "azure-devops";
4
5export function SourceControlIcon(props: {
6 readonly kind: SourceControlIconKind;
7 readonly size?: number;
8 readonly color?: string;
9}) {
10 const size = props.size ?? 18;
11
12 switch (props.kind) {
13 case "github":
14 return (
15 <Svg width={size} height={size} viewBox="0 0 16 16" fill="none">
16 <Path
17 fillRule="evenodd"
18 clipRule="evenodd"
19 d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82A7.68 7.68 0 0 1 8.02 3.86c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"
20 fill={props.color ?? "#24292F"}
21 />
22 </Svg>
23 );
24 case "gitlab":
25 return (
26 <Svg width={size} height={size} viewBox="0 0 32 32" fill="none">
27 <Path
28 d="m31.46 12.78-.04-.12-4.35-11.35A1.14 1.14 0 0 0 25.94.6c-.24 0-.47.1-.66.24-.19.15-.33.36-.39.6l-2.94 9h-11.9l-2.94-9A1.14 1.14 0 0 0 6.07.58a1.15 1.15 0 0 0-1.14.72L.58 12.68l-.05.11a8.1 8.1 0 0 0 2.68 9.34l.02.01.04.03 6.63 4.97 3.28 2.48 2 1.52a1.35 1.35 0 0 0 1.62 0l2-1.52 3.28-2.48 6.67-5h.02a8.09 8.09 0 0 0 2.7-9.36Z"
29 fill="#E24329"
30 />
31 <Path
32 d="m31.46 12.78-.04-.12a14.75 14.75 0 0 0-5.86 2.64l-9.55 7.24 6.09 4.6 6.67-5h.02a8.09 8.09 0 0 0 2.67-9.36Z"
33 fill="#FC6D26"
34 />
35 <Path
36 d="m9.9 27.14 3.28 2.48 2 1.52a1.35 1.35 0 0 0 1.62 0l2-1.52 3.28-2.48-6.1-4.6-6.07 4.6Z"
37 fill="#FCA326"
38 />
39 <Path
40 d="M6.44 15.3a14.71 14.71 0 0 0-5.86-2.63l-.05.12a8.1 8.1 0 0 0 2.68 9.34l.02.01.04.03 6.63 4.97 6.1-4.6-9.56-7.24Z"
41 fill="#FC6D26"
42 />
43 </Svg>
44 );
45 case "azure-devops":
46 return (
47 <Svg width={size} height={size} viewBox="0 0 96 96">
48 <Defs>
49 <LinearGradient id="azure-a" x1="42.83" x2="15.79" y1="12.69" y2="92.57">
50 <Stop offset="0" stopColor="#114A8B" />
51 <Stop offset="1" stopColor="#0669BC" />
52 </LinearGradient>
53 <LinearGradient id="azure-b" x1="47.84" x2="77.52" y1="10.36" y2="89.44">
54 <Stop offset="0" stopColor="#3CCBF4" />
55 <Stop offset="1" stopColor="#2892DF" />
56 </LinearGradient>
57 </Defs>
58 <Path
59 fill="url(#azure-a)"
60 d="M33.34 6.54h26.04l-27.03 80.1a4.15 4.15 0 0 1-3.94 2.81H8.15a4.14 4.14 0 0 1-3.93-5.47L29.4 9.38a4.15 4.15 0 0 1 3.94-2.83z"
61 />
62 <Path

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected