UNPKG

react-pdf-builder

Version:
13 lines (12 loc) 671 B
import { Style } from '../Style'; /** * Ensures that raw strings are wrapped in a ThemedText component so they can be rendered by [react-pdf](https://react-pdf.org/). * * Recurses on arrays and React fragments. Returns all other elements as-is. * * @param children Children to check/return. * @param textStyle Styles used for themed text component when wrapping strings. * @param allowStrings When `true`, strings will not be wrapped in a `ThemedText`. * @returns Sanitized children. Strings will be wrapped in ThemedText (if strings are not allowed). */ export declare const sanitizeChildren: (children?: any, textStyle?: Style, allowStrings?: boolean) => any;