react-native-pdf-light
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -259,2 +259,3 @@ "use strict"; | ||
refreshControl, | ||
renderComponent, | ||
...pdfViewProps | ||
@@ -272,2 +273,3 @@ } = props; | ||
const vScrollRef = (0, _react.useRef)(null); | ||
const RenderComponent = renderComponent ?? _PdfView.PdfView; | ||
const { | ||
@@ -352,3 +354,3 @@ bufferSize, | ||
style: zoomStyle | ||
}, /*#__PURE__*/_react.default.createElement(_PdfView.PdfView, _extends({}, pdfViewProps, { | ||
}, /*#__PURE__*/_react.default.createElement(RenderComponent, _extends({}, pdfViewProps, { | ||
onLoadComplete: localOnLoadComplete | ||
@@ -355,0 +357,0 @@ }))), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, { |
@@ -236,2 +236,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
refreshControl, | ||
renderComponent, | ||
...pdfViewProps | ||
@@ -249,2 +250,3 @@ } = props; | ||
const vScrollRef = useRef(null); | ||
const RenderComponent = renderComponent ?? PdfView; | ||
const { | ||
@@ -329,3 +331,3 @@ bufferSize, | ||
style: zoomStyle | ||
}, /*#__PURE__*/React.createElement(PdfView, _extends({}, pdfViewProps, { | ||
}, /*#__PURE__*/React.createElement(RenderComponent, _extends({}, pdfViewProps, { | ||
onLoadComplete: localOnLoadComplete | ||
@@ -332,0 +334,0 @@ }))), /*#__PURE__*/React.createElement(Animated.View, { |
import { ScrollViewProps } from 'react-native'; | ||
import { PdfViewProps } from './PdfView'; | ||
export declare type PdfComponent = (props: PdfViewProps) => JSX.Element; | ||
export declare type ZoomPdfViewProps = PdfViewProps & { | ||
@@ -21,2 +22,6 @@ /** | ||
refreshControl?: ScrollViewProps['refreshControl']; | ||
/** | ||
* Alternate component to render pdf page. Default is PdfView. | ||
*/ | ||
renderComponent?: PdfComponent; | ||
}; | ||
@@ -23,0 +28,0 @@ /** |
{ | ||
"name": "react-native-pdf-light", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Minimalist PDF viewer for React Native", | ||
@@ -5,0 +5,0 @@ "main": "lib/commonjs/index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
239248
2392