MCPcopy Create free account
hub / github.com/adobe/react-spectrum / GridList

Function GridList

starters/tailwind/src/GridList.tsx:18–33  ·  view source on GitHub ↗
({children, ...props}: GridListProps<T>)

Source from the content-addressed store, hash-verified

16import {twMerge} from 'tailwind-merge';
17
18export function GridList<T>({children, ...props}: GridListProps<T>) {
19 let isHorizontal =
20 (props as {orientation?: 'horizontal' | 'vertical'}).orientation === 'horizontal';
21 return (
22 <AriaGridList
23 {...props}
24 className={composeTailwindRenderProps(
25 props.className,
26 isHorizontal
27 ? 'flex flex-row flex-nowrap overflow-x-auto relative w-full max-w-[500px] bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg font-sans empty:flex empty:items-center empty:justify-center empty:italic empty:text-sm'
28 : 'overflow-auto w-[200px] relative bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg font-sans empty:flex empty:items-center empty:justify-center empty:italic empty:text-sm'
29 )}>
30 {children}
31 </AriaGridList>
32 );
33}
34
35const itemStyles = tv({
36 extend: focusRing,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected