@medalsocial/meda
Version:
Shared Meda UI shell and runtime package.
23 lines (22 loc) • 918 B
TypeScript
import type { ComponentPropsWithoutRef } from 'react';
import { type Components } from 'react-markdown';
export interface MarkdownViewProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
children: string;
/**
* Override or extend the default react-markdown component map.
* Spread defaults are applied first, so caller overrides win.
*/
components?: Components;
}
/**
* MarkdownView wraps `react-markdown` with `remark-gfm` and `rehype-highlight`,
* and applies a consistent prose stylesheet using meda design tokens.
*
* The markdown libraries are listed as **optional peer dependencies**. Install
* them in your app if you import this component:
*
* ```bash
* pnpm add react-markdown remark-gfm rehype-highlight
* ```
*/
export declare function MarkdownView({ children, className, components, ...props }: MarkdownViewProps): import("react/jsx-runtime").JSX.Element;