"use client";
import { cn } from "../ui";
export const PROJECT_COLORS = ["#6d9cff", "#f0b35b", "#4fd1a5", "#ff6b6b", "#b48cff", "#ff9f5a", "#3cc7d6", "#e86fb3"];
export function ColorPicker({ value, onChange }: { value: string | null; onChange: (c: string) => void }) {
return (
{PROJECT_COLORS.map(c => (
);
}
export function fmtBytes(n?: number | null) { if (n == null) return "—"; if (n < 1024) return `${n} o`; if (n < 1024 * 1024) return `${(n / 1024).toFixed(0)} Ko`; return `${(n / 1024 / 1024).toFixed(1)} Mo`; }