fix: use unknown cast for Event to MouseEvent conversion in ClientButton
This commit is contained in:
@@ -17,7 +17,7 @@ export function ClientButton({
|
||||
if (typeof onClick === 'string') {
|
||||
btnRef.current.onclick = onClick as any
|
||||
} else if (typeof onClick === 'function') {
|
||||
btnRef.current.onclick = (e: Event) => onClick(e as React.MouseEvent<HTMLButtonElement>)
|
||||
btnRef.current.onclick = (e: Event) => onClick(e as unknown as React.MouseEvent<HTMLButtonElement>)
|
||||
}
|
||||
}, [onClick])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user