Show a modal depending on a variable

thanks

whit this code:

const MyModal = ({ onClose, tipo}) => {

I get:
Binding element ‘onClose’ implicitly has an ‘any’ type.ts(7031)

   <MyModal 
               tipo={count}
              onClose={(value: React.SetStateAction<null>) => {
                setShowModal({ isOpen: false });
                value ? setRetVal(value) : setRetVal(null);
              }}

Type ‘{ tipo: number; onClose: (value: SetStateAction) => void; }’ is not assignable to type ‘IntrinsicAttributes & { onClose: any; }’.
Property ‘tipo’ does not exist on type ‘IntrinsicAttributes & { onClose: any; }’.ts(2322)

and this is the modal component:

const MyModal = ( {onClose} : { onClose: any}, tipo: number) => {
  
  if(tipo===0){
    return (
/* 
some code
*/
);
}