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

Function Resizer

packages/react-aria/stories/table/example-resizing.tsx:190–240  ·  view source on GitHub ↗
({
  column,
  layout,
  onResizeStart,
  onResize,
  onResizeEnd
}: {
  column: any;
  layout: any;
  onResizeStart: any;
  onResize: any;
  onResizeEnd: any;
})

Source from the content-addressed store, hash-verified

188 );
189}
190function Resizer({
191 column,
192 layout,
193 onResizeStart,
194 onResize,
195 onResizeEnd
196}: {
197 column: any;
198 layout: any;
199 onResizeStart: any;
200 onResize: any;
201 onResizeEnd: any;
202}): JSX.Element {
203 let ref = useRef(null);
204 let {resizerProps, inputProps} = useTableColumnResize(
205 {
206 column,
207 'aria-label': 'Resizer',
208 onResizeStart,
209 onResize,
210 onResizeEnd
211 } as AriaTableColumnResizeProps<any>,
212 layout,
213 ref
214 );
215
216 return (
217 <>
218 <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>
219 <div
220 role="presentation"
221 style={{
222 cursor: undefined,
223 alignSelf: 'stretch',
224 width: '20px',
225 border: '1px solid red',
226 touchAction: 'none',
227 flex: '0 0 auto',
228 position: 'absolute',
229 insetInlineEnd: 0,
230 height: '100%'
231 }}
232 {...resizerProps}>
233 <VisuallyHidden>
234 <input ref={ref} {...inputProps} />
235 </VisuallyHidden>
236 </div>
237 </FocusRing>
238 </>
239 );
240}
241export function TableColumnHeader({
242 column,
243 state,

Callers

nothing calls this directly

Calls 2

useTableColumnResizeFunction · 0.90
classNamesFunction · 0.90

Tested by

no test coverage detected