Files
lnreader/src/screens/Chapter/components/WebViewReader.js
T
Rajarshee Chatterjee 49160b7d98 Add ESLint and Prettier
2021-09-30 08:06:43 +05:30

28 lines
526 B
JavaScript

import React from 'react';
import WebView from 'react-native-webview';
export const WebViewReader = ({style, css, text, onScroll}) => (
<WebView
style={style}
originWhitelist={['*']}
scalesPageToFit={true}
showsVerticalScrollIndicator={false}
onScroll={onScroll}
source={{
html: `
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<style>
${css}
</style>
</head>
<body>
${text}
</body>
</html>
`,
}}
/>
);