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') {
|
if (typeof onClick === 'string') {
|
||||||
btnRef.current.onclick = onClick as any
|
btnRef.current.onclick = onClick as any
|
||||||
} else if (typeof onClick === 'function') {
|
} 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])
|
}, [onClick])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user