UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

12 lines (11 loc) 429 B
import type { ReactNode } from 'react'; export type FormatOptions = { br?: string; strong?: (c: ReactNode) => ReactNode; em?: (c: ReactNode) => ReactNode; link?: (c: ReactNode, href: string) => ReactNode; code?: (c: ReactNode) => ReactNode; }; type Nodes = ReactNode[]; export default function renderWithFormatting(text: string | Nodes, { br, strong, em, link, code, }?: FormatOptions): ReactNode; export {};