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

Function Cell

starters/tailwind/src/Table.tsx:180–205  ·  view source on GitHub ↗
(props: CellProps)

Source from the content-addressed store, hash-verified

178});
179
180export function Cell(props: CellProps) {
181 return (
182 <AriaCell
183 {...props}
184 className={cellStyles}
185 style={({hasChildItems, isTreeColumn, level}) => ({
186 paddingInlineStart: isTreeColumn
187 ? 4 + (hasChildItems ? 0 : 20) + (level - 1) * 16
188 : undefined
189 })}>
190 {composeRenderProps(
191 props.children,
192 (children, {hasChildItems, isTreeColumn, isExpanded, isDisabled}) => (
193 <>
194 {hasChildItems && isTreeColumn && (
195 <Button slot="chevron" className={expandButton({isDisabled})}>
196 <ChevronRight aria-hidden className={chevron({isExpanded, isDisabled})} />
197 </Button>
198 )}
199 {children}
200 </>
201 )
202 )}
203 </AriaCell>
204 );
205}

Callers

nothing calls this directly

Calls 1

composeRenderPropsFunction · 0.85

Tested by

no test coverage detected