I have this component:
const TheBarTitle = (
theClass: any,
columnTitle: string,
onClickAction: any,
) => {
return (
<div
className={theClass}
title="Click to add this filter"
onClick={onClickAction}
>
{columnTitle}
</div>
);
};
Which is used this way:
render: (rowData): any => {
return (
<div className={classes.contentxyz}>
......... </div>
);
},
},
{
title: (
<TheBarTitle
theClass={classes.contentxyz}
columnTitle="THIS IS THE TITLE"
onClickAction={(e: any) =>
this.handleTooltip(
e,
'theeetitle:',
)
}
/>
),
....
However I get the error: Tag 'TheBarTitle' expects at least '3' arguments, but the JSX factory 'React.createElement' provides at most '2'. TS622
I am using actually 3 arguments. Any idea what I am doing wrong and it sees only 2?