Skip to content

Commit

Permalink
add webview props
Browse files Browse the repository at this point in the history
  • Loading branch information
xcarpentier committed Jan 7, 2020
1 parent ae2e593 commit 43aaf72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -218,6 +219,7 @@ class PdfReader extends React.Component<Props, State> {
noLoader,
onLoadEnd,
onError,
webviewProps,
} = this.props

const originWhitelist = ['http://*', 'https://*', 'file://*', 'data:*']
Expand All @@ -238,6 +240,7 @@ class PdfReader extends React.Component<Props, State> {
}}
allowFileAccess={isAndroid}
mixedContentMode={isAndroid ? 'always' : undefined}
{...webviewProps}
/>
</View>
)
Expand Down

0 comments on commit 43aaf72

Please sign in to comment.