SPB Git forge

spb/ai-atlas

Public
41commits 1branches 0releases
4.6 MBsize
maindefault branch
12 days agolast push
HTML 77.2% TypeScript 10.5% Python 9.6% JavaScript 2.5%
796 B · 13 lines tsx
Raw Blame History
1import type { ReactNode } from 'react';2import { cn } from '@/lib/cn';34/**5 * Tablet-safe wrapper for dense `.data-table.stack` tables: rows stack under 768 px (the table's own behaviour) and the table6 * scrolls horizontally from 768 px up when its columns are wider than the pane, instead of widening the page.7 * (A scroll container offsets `position: sticky` headers, so tables inside it keep a static header.)8 */9export function ScrollX({ children, className }: { children: ReactNode; className?: string }) {10  // `relative`: absolutely positioned descendants (sr-only captions, quality bars) must take the wrapper as containing block, or they escape its clip and widen the page.11  return <div className={cn('relative md:overflow-x-auto md:scrollbar-thin', className)}>{children}</div>;12}13