SPB Git forge

spb/polyllm

Public
15commits 1branches 0releases
2.2 MBsize
maindefault branch
13 days agolast push
TypeScript 97.4% SQL 1% JavaScript 0.9% CSS 0.6%
1.5 KB · 25 lines tsx
Raw Blame History
1"use client";2import * as React from "react";3import { FolderKanban } from "lucide-react";4import { cn } from "@/lib/utils";56/** Curated project colours (hex) — the first entry is the iris accent. */7export const PROJECT_COLORS = ["#5457d6", "#0f9d7a", "#d97706", "#dc2626", "#db2777", "#7c3aed", "#0284c7", "#64748b"] as const;89/** Quick emoji choices for the create sheet (the input also accepts any emoji). */10export const PROJECT_EMOJIS = ["📁", "🚀", "🧪", "📊", "🧠", "✍️", "💼", "🎨", "🛠️", "📚", "🌍", "💡", "🔬", "📝", "🎯", "🧩", "🏗️", "🛒", "🎓", "❤️"];1112export function projectTint(color?: string | null): React.CSSProperties | undefined {13  if (!color) return undefined;14  return { backgroundColor: `color-mix(in srgb, ${color} 16%, transparent)`, color };15}1617export function ProjectIcon({ icon, color, size = "md", className }: { icon?: string | null; color?: string | null; size?: "sm" | "md" | "lg" | "xl"; className?: string }) {18  const dim = size === "sm" ? "size-6 text-[13px] rounded-md" : size === "lg" ? "size-11 text-[22px] rounded-xl" : size === "xl" ? "size-14 text-[28px] rounded-2xl" : "size-9 text-[18px] rounded-lg";19  return (20    <span className={cn("flex shrink-0 items-center justify-center leading-none", dim, !color && "bg-bg-muted text-fg-muted", className)} style={projectTint(color)} aria-hidden>21      {icon ? icon : <FolderKanban className={size === "sm" ? "size-3.5" : size === "xl" ? "size-6" : "size-4"} />}22    </span>23  );24}25