Skip to content

Commit 5508dd5

Browse files
committed
feat(ios): replace enum import with direct string types for presentationStyle
BREAKING CHANGE: No more `NitroInAppBrowserPresentationStyle` enum import required. Use string literals directly for presentation types.
1 parent 7776c7c commit 5508dd5

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const App = () => {
1515
barColor: 'purple',
1616
controlColor: '#000000',
1717
dismissButtonLabel: 'close',
18-
presentationStyle: NitroInAppBrowserPresentationStyle.FullScreen,
18+
presentationStyle: "fullScreen",
1919
});
2020
} catch (error) {
2121
console.error(error);

src/types.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
export type NitroInAppBrowserDismissButtonLabel = 'cancel' | 'done' | 'close'
22

3-
export enum NitroInAppBrowserPresentationStyle {
4-
PageSheet = 'pageSheet',
5-
FormSheet = 'formSheet',
6-
FullScreen = 'fullScreen',
7-
}
3+
export type NitroInAppBrowserPresentationStyle = 'pageSheet' | 'formSheet' | 'fullScreen'
84

95
export interface NitroInAppBrowserOptions {
10-
dismissButtonLabel?: NitroInAppBrowserDismissButtonLabel
11-
presentationStyle?: string // NitroInAppBrowserPresentationStyle
12-
barColor?: string
13-
controlColor?: string
6+
dismissButtonLabel?: NitroInAppBrowserDismissButtonLabel
7+
presentationStyle?: NitroInAppBrowserPresentationStyle
8+
barColor?: string
9+
controlColor?: string
1410
}

0 commit comments

Comments
 (0)