From 43aaf72b13e069df65c61ccb00b3099bd8507dca Mon Sep 17 00:00:00 2001 From: Xavier Carpentier Date: Tue, 7 Jan 2020 01:27:38 +0100 Subject: [PATCH] add webview props --- package.json | 2 +- src/index.tsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 792ecc4..bc17d6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rn-pdf-reader-js", - "version": "0.5.0", + "version": "0.5.1", "description": "PDF reader for Expo", "main": "node_modules/expo/AppEntry.js", "types": "lib/index.d.ts", diff --git a/src/index.tsx b/src/index.tsx index 05fffb5..930be43 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -144,6 +144,7 @@ interface Props { source: Source style?: View['props']['style'] webviewStyle?: WebView['props']['style'] + webviewProps?: WebView['props'] noLoader?: boolean customStyle?: CustomStyle onLoad?(): void @@ -218,6 +219,7 @@ class PdfReader extends React.Component { noLoader, onLoadEnd, onError, + webviewProps, } = this.props const originWhitelist = ['http://*', 'https://*', 'file://*', 'data:*'] @@ -238,6 +240,7 @@ class PdfReader extends React.Component { }} allowFileAccess={isAndroid} mixedContentMode={isAndroid ? 'always' : undefined} + {...webviewProps} /> )