import type { ReactElement } from 'react'; /** * Internal dependencies */ import type { Mapping } from './types'; interface TranslateWithMarkupProps { mapping?: Mapping; children: string; } /** * Component to facilitate translation of strings containing markup. * * Parses a string using DOMParser and replaces found element nodes * with the provided React components. * * This way, using dangerouslySetInnerHTML can be avoided. * * @see https://github.com/googleforcreators/web-stories-wp/issues/1578 * @param props Component props. * @param props.mapping Map of tag names to React components. * @param props.children Children / string to parse. * @return Transformed children. */ declare function TranslateWithMarkup({ mapping, children, }: TranslateWithMarkupProps): ReactElement | null; export default TranslateWithMarkup; //# sourceMappingURL=translateWithMarkup.d.ts.map