MCPcopy
hub / github.com/adobe/react-spectrum / Resizer

Function Resizer

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

Source from the content-addressed store, hash-verified

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