import React from 'react'; import { View } from 'react-native'; import { SpacingProps } from '../../core/utils'; export interface MarkdownProps extends SpacingProps { children: string; /** Override default code block language guess */ defaultCodeLanguage?: string; /** Max heading level to render (others downgraded) */ maxHeadingLevel?: number; /** Whether to render inline HTML literally (ignored for now) */ allowHtml?: boolean; /** Custom renderer overrides */ components?: Partial; /** Optional handler invoked when a markdown link is pressed */ onLinkPress?: (href: string) => void; /** Custom font family applied to all rendered text (overrides the theme font) */ fontFamily?: string; /** Shorthand alias for `fontFamily` */ ff?: string; } export interface MarkdownComponentMap { heading: (props: { level: number; children: React.ReactNode; }) => React.ReactNode; paragraph: (props: { children: React.ReactNode; }) => React.ReactNode; strong: (props: { children: React.ReactNode; }) => React.ReactNode; em: (props: { children: React.ReactNode; }) => React.ReactNode; codeInline: (props: { children: string; }) => React.ReactNode; codeBlock: (props: { code: string; language?: string; }) => React.ReactNode; blockquote: (props: { children: React.ReactNode; }) => React.ReactNode; list: (props: { ordered: boolean; items: React.ReactNode[]; }) => React.ReactNode; listItem: (props: { children: React.ReactNode; index?: number; ordered?: boolean; }) => React.ReactNode; link: (props: { href: string; children: React.ReactNode; }) => React.ReactNode; image: (props: { src: string; alt?: string; }) => React.ReactNode; thematicBreak: () => React.ReactNode; table: (props: { headers: React.ReactNode[]; rows: React.ReactNode[][]; alignments?: (TableAlignment | undefined)[]; }) => React.ReactNode; tableCell: (props: { children: React.ReactNode; isHeader?: boolean; align?: TableAlignment; }) => React.ReactNode; } type TableAlignment = 'left' | 'center' | 'right'; export declare const Markdown: React.ForwardRefExoticComponent>; export default Markdown;