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

Function Row

starters/tailwind/src/Table.tsx:136–156  ·  view source on GitHub ↗
({id, columns, children, ...otherProps}: RowProps<T>)

Source from the content-addressed store, hash-verified

134 "[&[draggable=true]]:cursor-grab [&[draggable=true]]:pressed:cursor-grabbing [&[draggable=true]]:[-webkit-user-drag:element] [&[draggable=true]]:[@media_not_((hover:hover)_and_(pointer:fine))]:before:content-[''] [&[draggable=true]]:[@media_not_((hover:hover)_and_(pointer:fine))]:before:absolute [&[draggable=true]]:[@media_not_((hover:hover)_and_(pointer:fine))]:before:inset-0";
135
136export function Row<T>({id, columns, children, ...otherProps}: RowProps<T>) {
137 let {selectionBehavior, allowsDragging} = useTableOptions();
138
139 return (
140 <AriaRow id={id} {...otherProps} className={rowStyles}>
141 {allowsDragging && (
142 <Cell>
143 <Button slot="drag" className={dragButtonStyles}>
144 ≡
145 </Button>
146 </Cell>
147 )}
148 {selectionBehavior === 'toggle' && (
149 <Cell>
150 <Checkbox slot="selection" />
151 </Cell>
152 )}
153 <Collection items={columns}>{children}</Collection>
154 </AriaRow>
155 );
156}
157
158const cellStyles = tv({
159 extend: focusRing,

Callers

nothing calls this directly

Calls 1

useTableOptionsFunction · 0.90

Tested by

no test coverage detected