Nenhuma descrição

index.d.ts 891B

123456789101112131415161718192021222324252627282930313233
  1. // Type definitions for react-native-autoheight-webview 1.x
  2. // Project: https://github.com/iou90/react-native-autoheight-webview
  3. // Definitions by: Naveen Ithappu <https://github.com/naveen-ithappu>
  4. // TypeScript Version: ^3.9.7
  5. import WebView, { WebViewProps } from 'react-native-webview';
  6. import { StyleProp, ViewStyle } from 'react-native';
  7. export interface StylesFile {
  8. href: string;
  9. type: string;
  10. rel: string;
  11. }
  12. export interface SizeUpdate {
  13. width: number;
  14. height: number;
  15. }
  16. export interface AutoHeightWebViewProps extends WebViewProps {
  17. onSizeUpdated: (size: SizeUpdate) => void;
  18. files: StylesFile[];
  19. style: StyleProp<ViewStyle>;
  20. customScript: string;
  21. customStyle: string;
  22. viewportContent: string;
  23. scalesPageToFit: boolean;
  24. scrollEnabledWithZoomedin: boolean;
  25. }
  26. export default class AutoHeightWebView extends WebView<Partial<AutoHeightWebViewProps>> {}