Issue in onClick in tsx

Im passing a function is props and adding it in onClick of button element but it shows below error

Type '(closed: string) => void' is not assignable to type 'MouseEventHandler<HTMLButtonElement>'.
  Types of parameters 'closed' and 'event' are incompatible.
    Type 'MouseEvent<HTMLButtonElement, MouseEvent>' is not assignable to type 'string'.ts(2322)
index.d.ts(1483, 9): The expected type comes from property 'onClick' which is declared here on type 'DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>'

Did you add ‘onClose’ to the function’s params so that inside the function scope it knows what ‘onClose’ is?

Yes I did,

Your onClose shouldn’t take a string for a parameter, the parameter should be typed as a MouseEvent.