瀏覽代碼

update interface

delyethan 4 年之前
父節點
當前提交
3e1817132e
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      index.d.ts

+ 3
- 3
index.d.ts 查看文件

@@ -6,7 +6,7 @@ import { Component } from 'react';
6 6
 
7 7
 import { WebViewProps } from 'react-native-webview';
8 8
 
9
-import { ViewStyle } from 'react-native';
9
+import { StyleProp, ViewStyle } from 'react-native';
10 10
 
11 11
 export interface StylesFile {
12 12
   href: string;
@@ -22,11 +22,11 @@ export interface SizeUpdate {
22 22
 export interface AutoHeightWebViewProps extends WebViewProps {
23 23
   onSizeUpdated: (size: SizeUpdate) => void;
24 24
   files: StylesFile[];
25
-  style: ViewStyle;
25
+  style: StyleProp<ViewStyle>;
26 26
   customScript: string;
27 27
   customStyle: string;
28 28
   viewportContent: string;
29 29
   scrollEnabledWithZoomedin: boolean;
30 30
 }
31 31
 
32
-export default class AutoHeightWebView extends Component<Partial<AutoHeightWebViewProps>> {}
32
+export default class AutoHeightWebView extends Component<Partial<AutoHeightWebViewProps>> { }