UNPKG

@prismicio/next

Version:

Helpers to integrate Prismic into Next.js apps

34 lines (33 loc) 1.27 kB
import { FC, ReactNode } from "react"; //#region src/pages/PrismicPreview.d.ts /** Props for `<PrismicPreview>`. */ type PrismicPreviewProps = { /** * The name of your Prismic repository. A Prismic Toolbar will be registered using this * repository. */ repositoryName: string; /** * The URL of your app's Prismic preview endpoint (default: `/api/preview`). This URL will be * fetched on preview update events. */ updatePreviewURL?: string; /** * The URL of your app's exit preview endpoint (default: `/api/exit-preview`). This URL will be * fetched on preview exit events. */ exitPreviewURL?: string; /** Children to render adjacent to the Prismic Toolbar. */ children?: ReactNode; }; /** * React component that sets up Prismic Previews using the Prismic Toolbar. When the Prismic Toolbar * send events to the browser, such as on preview updates and exiting, this component will * automatically refresh the page with the changes. * * This component can be wrapped around your app or added anywhere in your app's tree. It must be * rendered on every page. */ declare const PrismicPreview: FC<PrismicPreviewProps>; //#endregion export { PrismicPreview, PrismicPreviewProps }; //# sourceMappingURL=PrismicPreview.d.ts.map