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-25 16:16:18 -07:00 committed by GitHub
parent 2cb2113c29
commit a48c9819c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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';