{options.map((o) => {
const id = typeof o === "string" ? o : o.id;
const label = typeof o === "string" ? o : o.label;
const active = value === id;
return (
);
})}
);
}
// sortable column header
function SortTH({ label, col, sort, setSort, align = "left", width }) {
const active = sort.col === col;
return (
);
}
// vertical bar chart
function BarChart({ data, height = 150, accent }) {
const max = Math.max(1, ...data.map((d) => d.value));
return (
{data.map((d, i) => (
{d.top}
{d.label}
))}
);
}
// horizontal proportion bar (per-platform share)
function ShareBar({ rows, total }) {
return (