From 951a07bb5571dbda2a0c9b665969bc25fc5ae784 Mon Sep 17 00:00:00 2001 From: rfnd <62665947+rfnd@users.noreply.github.com> Date: Tue, 31 Mar 2020 11:52:17 +0200 Subject: [PATCH] Fix modalpresentationstyle (#6077) * Fix invalid popover enum value for modal presentation style The correct enum value as defined in lib/ios/RNNConvert.m is "popover" not "popOver", in line with UIModalPresentationPopover. * Add to documentation on modal presentation styles Add popover value and link to iOS documentation. Co-authored-by: Yogev Ben David --- docs/api/OptionsModalPresentationStyle.md | 2 +- docs/docs/options-migration.md | 5 ++++- lib/src/interfaces/Options.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/api/OptionsModalPresentationStyle.md b/docs/api/OptionsModalPresentationStyle.md index 7de0537eb47..250d0755ef8 100644 --- a/docs/api/OptionsModalPresentationStyle.md +++ b/docs/api/OptionsModalPresentationStyle.md @@ -7,4 +7,4 @@ - overCurrentContext - overFullScreen - pageSheet -- popOver +- popover diff --git a/docs/docs/options-migration.md b/docs/docs/options-migration.md index 1863cd618df..0484ee75a46 100644 --- a/docs/docs/options-migration.md +++ b/docs/docs/options-migration.md @@ -374,11 +374,14 @@ topBar: { Controls the behavior of screens displayed modally. ### Options supported on iOS -* overCurrentContext - Content is displayed over the previous screen. Useful for **transparent modals** +* `overCurrentContext` - Content is displayed over the previous screen. Useful for **transparent modals** * `formSheet` - Content is centered in the screen * `pageSheet` -Content partially covers the underlying content * `overFullScreen` - Content covers the screen, without detaching previous content. * `fullScreen` - Content covers the screen, previous content is detached. +* `popover` - Content is displayed in a popover view. + +More information on the different styles for iOS can be found on https://developer.apple.com/documentation/uikit/uimodalpresentationstyle ### Options supported on Android * `overCurrentContext` - Content is displayed over the previous screen. Useful for **transparent modals** diff --git a/lib/src/interfaces/Options.ts b/lib/src/interfaces/Options.ts index 62e20a3adea..026987bf8d9 100644 --- a/lib/src/interfaces/Options.ts +++ b/lib/src/interfaces/Options.ts @@ -119,7 +119,7 @@ export enum OptionsModalPresentationStyle { overFullScreen = 'overFullScreen', overCurrentContext = 'overCurrentContext', currentContext = 'currentContext', - popOver = 'popOver', + popover = 'popover', fullScreen = 'fullScreen', none = 'none' }