11import React from "react" ;
2- import { ScrollView } from "react-native" ;
2+ import { ScrollView , StyleSheet } from "react-native" ;
33import { useRoute } from "@react-navigation/native" ;
44import HTML from "react-native-render-html" ;
55
66import { ui } from "utils" ;
77import { NavStatelessComponent } from "interfaces" ;
8+ import { Layout } from "constant" ;
9+ import { Colors } from "style" ;
810
911import styles from "./InfoModalScreen.styles" ;
1012import navigationOptions from "./InfoModal.navigationOptions" ;
1113import methodology from "../../../assets/methodology/methodology.json" ;
1214import emissionInfo from "../../../assets/emission-info/emission-info.json" ;
1315
1416const InfoModalScreen : NavStatelessComponent = ( ) => {
17+ const linkStyle = StyleSheet . create ( {
18+ a : {
19+ color : Colors . primary ,
20+ textDecorationLine : "underline" ,
21+ } ,
22+ } ) ;
1523 const route = useRoute ( ) ;
1624
1725 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -32,7 +40,17 @@ const InfoModalScreen: NavStatelessComponent = () => {
3240 style = { styles . container }
3341 contentInsetAdjustmentBehavior = "automatic"
3442 >
35- < HTML source = { { html } } onLinkPress = { ui . onHTMLBodyLinkPress } baseFontStyle = { styles . text } />
43+ < HTML
44+ source = { { html } }
45+ contentWidth = { Layout . screen . width }
46+ baseStyle = { styles . text }
47+ tagsStyles = { linkStyle }
48+ renderersProps = { {
49+ a : {
50+ onPress : ui . onHTMLBodyLinkPress ,
51+ } ,
52+ } }
53+ />
3654 </ ScrollView >
3755 ) ;
3856} ;
0 commit comments