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

Function Column

starters/docs/src/Table.tsx:39–57  ·  view source on GitHub ↗
(props: Omit<ColumnProps, 'children'> & {children?: React.ReactNode})

Source from the content-addressed store, hash-verified

37}
38
39export function Column(props: Omit<ColumnProps, 'children'> & {children?: React.ReactNode}) {
40 return (
41 <AriaColumn {...props} className="react-aria-Column button-base">
42 {({allowsSorting, sortDirection}) => (
43 <div className="column-header">
44 <Group role="presentation" tabIndex={-1} className="column-name">
45 {props.children}
46 </Group>
47 {allowsSorting && (
48 <span aria-hidden="true" className="sort-indicator">
49 {sortDirection === 'ascending' ? <ChevronUp size={16} /> : <ChevronDown size={16} />}
50 </span>
51 )}
52 {props.allowsResizing && <ColumnResizer />}
53 </div>
54 )}
55 </AriaColumn>
56 );
57}
58
59export function TableHeader<T>({columns, children, ...otherProps}: TableHeaderProps<T>) {
60 let {selectionBehavior, selectionMode, allowsDragging} = useTableOptions();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected