import { Fragment } from "react"; import { cn } from "@/app/lib/utils"; /** * An UPPER_SNAKE code (module, action, …) that may wrap between its words inside a table cell. Cells are * `whitespace-nowrap` by default and these codes have no spaces, so the span opts back into wrapping and adds a * break opportunity after each "_" — the code breaks at word boundaries, never mid-word. */ export function BreakableCode({ value, className }: { value: string; className?: string }) { const parts = value.split("_"); return ( {parts.map((part, i) => ( {part} {i < parts.length - 1 && ( <> _ )} ))} ); }