Explorar el Código

corrected size update callback type

Naveen Ithapu hace 5 años
padre
commit
fb5000df52
Se han modificado 1 ficheros con 8 adiciones y 3 borrados
  1. 8
    3
      index.d.ts

+ 8
- 3
index.d.ts Ver fichero

@@ -6,16 +6,21 @@ import { Component } from "react";
6 6
 import { WebViewProps } from "react-native-webview";
7 7
 import {ViewStyle} from "react-native";
8 8
 
9
-export interface Styles{
9
+export interface StylesFiles {
10 10
     href: string;
11 11
     type: string;
12 12
     rel: string;
13 13
 }
14 14
 
15
+export interface SizeUpdate {
16
+    width:number,
17
+    height:number
18
+}
19
+
15 20
 export interface AutoHeightWebViewProps extends WebViewProps {
16
-    onSizeUpdated: (size:number)=>void;
21
+    onSizeUpdated: (size: SizeUpdate)=>void;
17 22
     baseUrl: string;
18
-    files: Styles[];
23
+    files: StylesFiles[];
19 24
     style: ViewStyle;
20 25
     customScript: string;
21 26
     customStyle: string;