fix: EventBoundary import

This commit is contained in:
Tom Moor
2024-06-14 10:21:44 -04:00
parent dfe36fcbf5
commit bf130f9915
5 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
import * as React from "react";
type Props = {
children?: React.ReactNode;
className?: string;
};
const EventBoundary: React.FC<Props> = ({ children, className }: Props) => {
const handleClick = React.useCallback((event: React.SyntheticEvent) => {
event.preventDefault();
event.stopPropagation();
}, []);
return (
<span onClick={handleClick} className={className}>
{children}
</span>
);
};
export default EventBoundary;