UNPKG

@md2docx/react-markdown

Version:

A modern, SSR-friendly React Markdown renderer that preserves the MDAST tree for reuse (e.g., mdast2docx), supports full JSX children, unified plugins, and component overrides.

23 lines (22 loc) 753 B
import { ComponentProps } from "../../utils"; /** * Props for the `Omit` component. * - Inherits standard component props including the HAST `node`. * - `noWarning`: Optional flag to suppress the console warning. */ export type OmitProps = ComponentProps & { noWarning?: boolean; }; /** * A utility component that completely omits a disallowed element and all its content. * Useful for sanitizing output or strictly removing specific tags like `<script>`, `<iframe>`, etc. * * Example usage: * ```tsx * components: { script: Omit } * ``` * * @remarks * Acts like `disallowedElements` (fully stripped). Use `noWarning` to suppress dev-time messages. */ export declare const Omit: ({ noWarning, node: { tagName } }: OmitProps) => null;