@prismicio/react
Version:
React components and hooks to fetch and present Prismic content
28 lines (27 loc) • 921 B
TypeScript
import { RichTextField } from "@prismicio/client";
import { FC } from "react";
//#region src/PrismicText.d.ts
/** Props for `<PrismicText>`. */
type PrismicTextProps = {
/** The Prismic rich text field to render. */field: RichTextField | null | undefined;
/**
* The string rendered when the field is empty. If a fallback is not given, `null` will be
* rendered.
*/
fallback?: string; /** The separator used between blocks. Defaults to `\n`. */
separator?: string;
};
/**
* Renders content from a Prismic rich text field as plain text (no HTML).
*
* @example
* ```tsx
* <PrismicText field={slice.primary.text} />;
* ```
*
* @see Learn how to display rich text as plain text or React components: {@link https://prismic.io/docs/fields/rich-text}
*/
declare const PrismicText: FC<PrismicTextProps>;
//#endregion
export { PrismicText, PrismicTextProps };
//# sourceMappingURL=PrismicText.d.ts.map