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;

View File

@@ -1,7 +1,7 @@
import { transparentize } from "polished";
import * as React from "react";
import styled, { createGlobalStyle } from "styled-components";
import EventBoundary from "~/components/EventBoundary";
import EventBoundary from "../../components/EventBoundary";
import { s } from "../../styles";
import { EditorStyleHelper } from "../styles/EditorStyleHelper";