fix(ts): Convert ContentInsetAdjustmentBehavior from an enum back to a string union type (#1536)

ContentInsetAdjustmentBehavior was originally added as a string union type. The change to support MacOS replaced it with an enum, which was a bit of a breaking change, especially as the enum was not exported from the main library. Exporting the enum would probably also help, but since this was the only enum and the rest of react-native-webview uses string unions instead, it seems best to revert it to a string union.

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
This commit is contained in:
Caleb Clarke
2020-08-26 01:16:18 +02:00
committed by GitHub
co-authored by Jamon Holmgren
parent 2cb2113c29
commit a48c9819c5
+1 -6
View File
@@ -301,12 +301,7 @@ export interface AndroidNativeWebViewProps extends CommonNativeWebViewProps {
readonly urlPrefixesForDefaultIntent?: string[];
}
export enum ContentInsetAdjustmentBehavior {
automatic = 'automatic',
scrollableAxes = 'scrollableAxes',
never = 'never',
always = 'always'
};
export declare type ContentInsetAdjustmentBehavior = 'automatic' | 'scrollableAxes' | 'never' | 'always';
export declare type ContentMode = 'recommended' | 'mobile' | 'desktop';