Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e95d7a8

Browse files
committed
chore(example): migrate code to new API
1 parent 4e9867f commit e95d7a8

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

example/CustomExample.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,11 @@ export default function CustomExample({
184184
<RenderHTML
185185
key={`custom-${instance}`}
186186
source={{ html: table1 }}
187-
onLinkPress={onLinkPress}
188187
contentWidth={availableWidth}
189-
{...htmlConfig}
188+
renderersProps={{
189+
a: { onPress: onLinkPress },
190+
...htmlConfig.renderersProps
191+
}}
190192
debug={false}
191193
/>
192194
);

example/HeuristicTableExample.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,13 @@ export default function HeuristicTable({
394394
<RenderHTML
395395
key={`custom-${instance}`}
396396
source={{ html }}
397-
onLinkPress={onLinkPress}
398397
contentWidth={availableWidth}
399398
enableExperimentalMarginCollapsing
400399
{...htmlConfig}
400+
renderersProps={{
401+
a: { onPress: onLinkPress },
402+
...htmlConfig.renderersProps
403+
}}
401404
debug={false}
402405
/>
403406
);

example/SimpleExample.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,12 @@ export default function SimpleExample({
191191
<RenderHTML
192192
key={`simple-${instance}`}
193193
source={{ html: table1 }}
194-
onLinkPress={onLinkPress}
195194
contentWidth={availableWidth}
196195
{...htmlConfig}
196+
renderersProps={{
197+
a: { onPress: onLinkPress },
198+
...htmlConfig.renderersProps
199+
}}
197200
debug={false}
198201
/>
199202
);

example/YoutubeExample.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default function YoutubeExample({
3939
key={`youtube-${instance}`}
4040
contentWidth={availableWidth}
4141
source={{ html: youtubeIframe }}
42-
onLinkPress={onLinkPress}
4342
{...htmlConfig}
4443
renderersProps={{
44+
a: { onPress: onLinkPress },
4545
iframe: {
4646
scalesPageToFit
4747
}

0 commit comments

Comments
 (0)