Skip to content

Commit

Permalink
refactor: use better default type for iframe override
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Aug 31, 2024
1 parent 5010845 commit 9cd030f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/components/Puck/components/Preview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import AutoFrame, { autoFrameContext } from "../../../AutoFrame";
import styles from "./styles.module.css";
import { getClassNameFactory } from "../../../../lib";
import { DefaultRootProps } from "../../../../types/Config";
<<<<<<< HEAD
=======
import { DefaultOverride } from "../../../DefaultOverride";
import { FrameContextConsumer } from "react-frame-component";
>>>>>>> f0ecfe51 (refactor: use better default type for iframe override)

const getClassName = getClassNameFactory("PuckPreview", styles);

Expand All @@ -30,7 +35,7 @@ export const Preview = ({ id = "puck-preview" }: { id?: string }) => {
[config.root]
);

const Frame = useMemo(() => overrides.iframe || "div", [overrides]);
const Frame = useMemo(() => overrides.iframe || DefaultOverride, [overrides]);

// DEPRECATED
const rootProps = state.data.root.props || state.data.root;
Expand Down

0 comments on commit 9cd030f

Please sign in to comment.