import { FC, ReactNode } from "react"; import { SliceSimulatorProps, disableEventHandler, getDefaultProps, onClickHandler, simulatorClass, simulatorRootClass, } from "@prismicio/simulator/kit"; type SliceSimulatorWrapperProps = { children: ReactNode; className?: string; message?: string; hasSlices: boolean; } & Omit; /** * A wrapper for the slice simulator that isolates the given children from the * page's layout. */ export const SliceSimulatorWrapper: FC = ({ className, children, zIndex, background, message, hasSlices, }) => { const defaultProps = getDefaultProps(); return (
{message ? (
) : hasSlices ? (
{children}
) : null}
); };