// One axis's collapse control. Rows and columns are the same thing — a depth in // ViewConfig, counting the levels to show — so they are drawn by one component // rather than two that happen to look alike. // // The buttons are named after the level they reveal. The row axis used to be a // fixed 0 1 2 3: a number means nothing without already knowing what group_by // holds, and a fixed range offers levels that do not exist while hiding ones // that do. export default function DepthButtons({ label, levels, depth, onPick, totalLabel = 'Total' }) { return (