Ver código fonte

corrected size update callback type

Naveen Ithapu 6 anos atrás
pai
commit
fb5000df52
1 arquivos alterados com 8 adições e 3 exclusões
  1. 8
    3
      index.d.ts

+ 8
- 3
index.d.ts Ver arquivo

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