import type { ITheme, IStyleFunctionOrObject, IStyle, ILinkStyleProps, IImageStyleProps } from '@fluentui/react'; import type { IMarkdownHeaderStyleProps } from './MarkdownHeader'; import type { IMarkdownParagraphStyleProps } from './MarkdownParagraph'; import type { IMarkdownCodeStyleProps } from './MarkdownCode'; import type { IMarkdownTableStyleProps } from '../MarkdownTable/index'; import type { MarkdownToJSX } from 'markdown-to-jsx'; export interface IMarkdownProps { /** CSS class to apply to the component root */ className?: string; /** * If true, using a code block with language name `renderhtml` will render the contents as HTML. * This is to work around markdown-to-jsx's limited support for nested HTML elements. */ enableRenderHtmlBlock?: boolean; /** Additional component overrides for markdown rendering */ overrides?: MarkdownToJSX.Overrides; /** Theme provided by higher-order component. */ theme?: ITheme; /** Optional override styles */ styles?: IStyleFunctionOrObject; } export type IMarkdownStyleProps = Required>; export interface IMarkdownStyles { root: IStyle; subComponentStyles: IMarkdownSubComponentStyles; } export interface IMarkdownSubComponentStyles { // TODO: remove anys /* eslint-disable @typescript-eslint/no-explicit-any */ header: IStyleFunctionOrObject; paragraph: IStyleFunctionOrObject; code: IStyleFunctionOrObject; link: IStyleFunctionOrObject; image: IStyleFunctionOrObject; button: IStyleFunctionOrObject; table: IStyleFunctionOrObject; thead: IStyleFunctionOrObject; tbody: IStyleFunctionOrObject; tr: IStyleFunctionOrObject; th: IStyleFunctionOrObject; td: IStyleFunctionOrObject; }