import clsx from "clsx"; import type { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from "react"; /* * One table treatment for the whole console. * * There were four: billing, licences, accounts and catalogue each wrote their * own thead, and they disagreed about the head's type size, its tracking, * whether it sat on --panel-2, and whether numbers were tabular. Catalogue's * heads were sentence-case body text. A registry whose columns are set four * ways does not read as one product. * * The head is the keyed idiom — mono, small, uppercase, widely tracked — which * is what a column head is: a key above a value, exactly as the record line is * a key beside one. */ export function Table({ className, children, ...props }: HTMLAttributes) { return (
{children}
); } export function THead({ className, children, ...props }: HTMLAttributes) { return ( {children} ); } export function TBody({ className, children, ...props }: HTMLAttributes) { return ( {children} ); } export function TR({ className, children, ...props }: HTMLAttributes) { return ( {children} ); } interface CellProps { /** Right-aligns the cell. For quantities and money, which read down the column. */ numeric?: boolean; } export function TH({ className, numeric, children, ...props }: ThHTMLAttributes & CellProps) { return ( {children} ); } export function TD({ className, numeric, children, ...props }: TdHTMLAttributes & CellProps) { return ( {children} ); } /** The secondary line under a cell's main value — an ID, a deployment, a date. */ export function Sub({ children }: { children: React.ReactNode }) { return
{children}
; }