UNPKG

@vandrei977/react-native-render-html

Version:

The hackable, full-featured Open Source HTML rendering solution for React Native.

29 lines (25 loc) 585 B
import { Linking } from 'react-native'; import { RenderersProps } from '../shared-types'; export async function defaultAOnPress(_e: any, href: string): Promise<unknown> { try { await Linking.openURL(href); } catch (e) { console.warn(`Could not open URL "${href}".`, e); } return null; } const defaultRendererProps: Required<RenderersProps> = { img: { initialDimensions: { height: 50, width: 50 }, enableExperimentalPercentWidth: false }, a: { onPress: defaultAOnPress }, ol: {}, ul: {} }; export default defaultRendererProps;