Browse Source

Added ContentInsetAdjustmentBehavior enum.

Tom Underhill 4 years ago
parent
commit
ddc8a6d843
1 changed files with 11 additions and 20 deletions
  1. 11
    20
      src/WebViewTypes.ts

+ 11
- 20
src/WebViewTypes.ts View File

266
   urlPrefixesForDefaultIntent?: readonly string[];
266
   urlPrefixesForDefaultIntent?: readonly string[];
267
 }
267
 }
268
 
268
 
269
+export enum ContentInsetAdjustmentBehavior {
270
+  automatic = 'automatic',
271
+  scrollableAxes = 'scrollableAxes',
272
+  never = 'never',
273
+  always = 'always'
274
+};
275
+
269
 export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
276
 export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
270
   allowingReadAccessToURL?: string;
277
   allowingReadAccessToURL?: string;
271
   allowsBackForwardNavigationGestures?: boolean;
278
   allowsBackForwardNavigationGestures?: boolean;
274
   automaticallyAdjustContentInsets?: boolean;
281
   automaticallyAdjustContentInsets?: boolean;
275
   bounces?: boolean;
282
   bounces?: boolean;
276
   contentInset?: ContentInsetProp;
283
   contentInset?: ContentInsetProp;
277
-  contentInsetAdjustmentBehavior?:
278
-    | 'automatic'
279
-    | 'scrollableAxes'
280
-    | 'never'
281
-    | 'always';
284
+  contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
282
   dataDetectorTypes?: DataDetectorTypes | readonly DataDetectorTypes[];
285
   dataDetectorTypes?: DataDetectorTypes | readonly DataDetectorTypes[];
283
   decelerationRate?: number;
286
   decelerationRate?: number;
284
   directionalLockEnabled?: boolean;
287
   directionalLockEnabled?: boolean;
297
   automaticallyAdjustContentInsets?: boolean;
300
   automaticallyAdjustContentInsets?: boolean;
298
   bounces?: boolean;
301
   bounces?: boolean;
299
   contentInset?: ContentInsetProp;
302
   contentInset?: ContentInsetProp;
300
-  contentInsetAdjustmentBehavior?:
301
-    | 'automatic'
302
-    | 'scrollableAxes'
303
-    | 'never'
304
-    | 'always';
303
+  contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
305
   directionalLockEnabled?: boolean;
304
   directionalLockEnabled?: boolean;
306
   hideKeyboardAccessoryView?: boolean;
305
   hideKeyboardAccessoryView?: boolean;
307
   pagingEnabled?: boolean;
306
   pagingEnabled?: boolean;
364
    * content area of the scroll view. The default value of this property is
363
    * content area of the scroll view. The default value of this property is
365
    * "never". Available on iOS 11 and later.
364
    * "never". Available on iOS 11 and later.
366
    */
365
    */
367
-  contentInsetAdjustmentBehavior?:
368
-    | 'automatic'
369
-    | 'scrollableAxes'
370
-    | 'never'
371
-    | 'always';
366
+  contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
372
 
367
 
373
   /**
368
   /**
374
    * The amount by which the web view content is inset from the edges of
369
    * The amount by which the web view content is inset from the edges of
530
    * content area of the scroll view. The default value of this property is
525
    * content area of the scroll view. The default value of this property is
531
    * "never". Available on iOS 11 and later.
526
    * "never". Available on iOS 11 and later.
532
    */
527
    */
533
-  contentInsetAdjustmentBehavior?:
534
-    | 'automatic'
535
-    | 'scrollableAxes'
536
-    | 'never'
537
-    | 'always';
528
+  contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
538
 
529
 
539
   /**
530
   /**
540
    * The amount by which the web view content is inset from the edges of
531
    * The amount by which the web view content is inset from the edges of