import * as React from 'react'; import { cn } from '@/lib/utils'; /** * Layout helpers. * * These exist so vertical rhythm and grid behaviour are declared once. The * reference pages each invented their own spacing (`space-y-5`, `space-y-6`, * `space-y-8` on sibling pages), which is exactly the drift a design system is * supposed to prevent. */ const GAPS = { sm: 'gap-3', default: 'gap-4', lg: 'gap-6' }; /** * Grid — responsive column layouts with the app's standard breakpoints. * * `cols` is the count at the largest breakpoint; the intermediate steps are * chosen to avoid orphan cards (6 → 2/3/6 rather than 1/3/6). */ /** @param {any} props */ export function Grid({ cols = 3, gap = 'default', className, children, ...props }) { const columns = { 1: 'grid-cols-1', 2: 'grid-cols-1 sm:grid-cols-2', 3: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3', 4: 'grid-cols-2 md:grid-cols-3 lg:grid-cols-4', 5: 'grid-cols-2 md:grid-cols-3 lg:grid-cols-5', 6: 'grid-cols-2 md:grid-cols-3 lg:grid-cols-6', }[cols]; return (
{subtitle}
}