@itwin/itwinui-react
Version:
A react component library for iTwinUI
14 lines (13 loc) • 809 B
TypeScript
import * as React from 'react';
/**
* `true` if the current React version is 17 or 18. Else, is `false`.
* @private
*/
export declare const isReact17or18: boolean;
/**
* Wrapper over `cloneElement` that automatically checks for `isValidElement`
* and automatically merges `children.ref` with the ref passed in props.
*
* @private
*/
export declare const cloneElementWithRef: (children: React.ReactNode, getProps: (children: React.JSX.Element) => Record<string, unknown>) => string | number | bigint | true | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;