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

Function Resizer

packages/react-aria/stories/table/example-docs.tsx:180–207  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

178}
179
180function Resizer(props) {
181 let {column, layoutState, onResizeStart, onResize, onResizeEnd} = props;
182 let ref = useRef<HTMLInputElement | null>(null);
183 let {resizerProps, inputProps, isResizing} = useTableColumnResize(
184 {
185 column,
186 'aria-label': 'Resizer',
187 onResizeStart,
188 onResize,
189 onResizeEnd
190 },
191 layoutState,
192 ref
193 );
194 let {focusProps, isFocusVisible} = useFocusRing();
195
196 return (
197 <div
198 role="presentation"
199 className={classNames(ariaStyles, 'aria-table-resizer', {
200 focus: isFocusVisible,
201 resizing: isResizing
202 })}
203 {...resizerProps}>
204 <input ref={ref} {...mergeProps(inputProps, focusProps)} />
205 </div>
206 );
207}
208
209function ResizableTableRow({item, children, state}) {
210 let ref = useRef<HTMLTableRowElement | null>(null);

Callers

nothing calls this directly

Calls 4

useTableColumnResizeFunction · 0.90
useFocusRingFunction · 0.90
classNamesFunction · 0.90
mergePropsFunction · 0.90

Tested by

no test coverage detected