No overload matches this call.
Overload 1 of 2, '(props: TooltipProps | Readonly<TooltipProps>): Tooltip', gave the following error.
Type '{ children: string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal | null; ... 5 more ...; content: Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
Overload 2 of 2, '(props: TooltipProps, context: any): Tooltip', gave the following error.
Type '{ children: string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal | null; ... 5 more ...; content: Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
19 <TooltipLite
<TooltipLite
className={classnames(styles.target, className)}
mouseOutDelay={200}
tipContentClassName={styles.tooltip}
arrowSize={8}
padding="7px 14px"
content={<div className={styles.container}>{content}</div>}>
{children}
</TooltipLite>
Typescript complains once you update to React 18, because
childrennow have to be listed explicitely on component props.The error is this:
My code: