Fork Horse repository, listed by its owner. Publisher snapshot.

packages/forkhorse-gatekeeper/src/rail-icon.ts

Snapshot at 34e3175

Containing directory

1,233 bytes · typescriptView raw
1// Phosphor Horse regular, @phosphor-icons/react 2.1.10 dist/defs/Horse.
2// Inlined to avoid adding a runtime dependency. MIT attribution is in NOTICE.
3const horseRegularPath = "M136,100a12,12,0,1,1-12-12A12,12,0,0,1,136,100Zm96,29.48A104.29,104.29,0,0,1,130.1,232l-2.17,0a103.32,103.32,0,0,1-69.26-26A8,8,0,1,1,69.34,194a84.71,84.71,0,0,0,20.1,13.37L116,170.84c-22.78-9.83-47.47-5.65-61.4-3.29A31.84,31.84,0,0,1,23.3,154.72l-.3-.43-13.78-22a8,8,0,0,1,2.59-11.05L112,59.53V32a8,8,0,0,1,8-8h8A104,104,0,0,1,232,129.48Zm-16-.22A88,88,0,0,0,128,40V64a8,8,0,0,1-3.81,6.81L27.06,130.59l9.36,15A15.92,15.92,0,0,0,52,151.77c16-2.7,48.77-8.24,78.07,8.18A40.06,40.06,0,0,0,168,120a8,8,0,0,1,16,0,56.07,56.07,0,0,1-51.8,55.83l-27.11,37.28A90.89,90.89,0,0,0,129.78,216,88.29,88.29,0,0,0,216,129.26Z";
4
5/** The pinned OS masks this glyph with the rail row's current text color. */
6export function railIconUrl(railIcon: string): string {
7  if (railIcon !== "phosphor:horse") throw new TypeError("Unsupported brand rail icon.");
8  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="${horseRegularPath}"/></svg>`;
9  return `data:image/svg+xml,${encodeURIComponent(svg).replace(/'/g, "%27")}`;
10}
11