Skip to content

Commit f06c1ab

Browse files
authored
Merge pull request #26 from patrickkabwe/feat/open-as-promise
Feat/open as promise
2 parents d596ff2 + e10c031 commit f06c1ab

30 files changed

Lines changed: 882 additions & 646 deletions

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ updates:
3333
- "nitrogen"
3434

3535
groups:
36-
rncli:
36+
react-native-cli:
3737
patterns:
3838
- "@react-native-community/cli*"
3939
babel:
4040
patterns:
4141
- "@babel/*"
42-
rn:
42+
react-native:
4343
patterns:
4444
- "@react-native/*"

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@ const App = () => {
3636
<Button
3737
title="Open Nowie Tech"
3838
onPress={() => {
39-
NitroInAppBrowser.open('https://nowietech.com');
39+
try {
40+
await NitroInAppBrowser.open('https://nowietech.com', {
41+
barColor: 'purple',
42+
controlColor: '#000000',
43+
dismissButtonLabel: 'close',
44+
presentationStyle: NitroInAppBrowserPresentationStyle.FullScreen,
45+
});
46+
} catch (error) {
47+
console.error(error);
48+
}
4049
}}
4150
/>
4251
</SafeAreaView>

bun.lockb

8.03 KB
Binary file not shown.

example/App.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ const App = () => {
1010
<SafeAreaView>
1111
<Button
1212
title="Open Nowie Tech"
13-
onPress={() => {
14-
NitroInAppBrowser.open('https://nowietech.com', {
15-
barColor: '#fef0f0',
16-
controlColor: '#000000',
17-
dismissButtonLabel: 'close',
18-
presentationStyle: NitroInAppBrowserPresentationStyle.PageSheet,
19-
});
13+
onPress={async () => {
14+
try {
15+
await NitroInAppBrowser.open('https://nowietech.com', {
16+
barColor: 'purple',
17+
controlColor: '#000000',
18+
dismissButtonLabel: 'close',
19+
presentationStyle: NitroInAppBrowserPresentationStyle.FullScreen,
20+
});
21+
} catch (error) {
22+
console.error(error);
23+
}
2024
}}
2125
/>
2226
</SafeAreaView>

0 commit comments

Comments
 (0)