data-table-material
Version:
A dynamic and customizable table component for React, built with Material UI & TypeScript.
26 lines (25 loc) • 837 B
TypeScript
import { ReactNode } from 'react';
/**
* A React component that provides resizable functionality to its child element.
* The child element should be a function that accepts a `ref` object.
*
* @param {Object} props - The component props.
* @param {Function} props.children - A function that renders the child element and accepts a `ref` object.
* @returns {ReactNode} The rendered child element with resizable functionality.
*
* @example
* <Resizable>
* {({ ref }) => (
* <div ref={ref}>
* Resizable content
* </div>
* )}
* </Resizable>
*/
declare const Resizable: ({ updateColumnWidth, children, }: {
updateColumnWidth: (field: string, newWidth: number) => void;
children: ({ ref }: {
ref: (nodeEle: HTMLElement) => void;
}) => ReactNode;
}) => ReactNode;
export default Resizable;