diff --git a/examples/default/src/screens/BugReportingScreen.tsx b/examples/default/src/screens/BugReportingScreen.tsx index 95a850569..a8afc14a8 100644 --- a/examples/default/src/screens/BugReportingScreen.tsx +++ b/examples/default/src/screens/BugReportingScreen.tsx @@ -1,11 +1,20 @@ import React from 'react'; -import Instabug, { BugReporting, InvocationOption, ReportType } from 'instabug-reactnative'; +import Instabug, { + BugReporting, + InvocationOption, + ReportType, + ExtendedBugReportMode, + WelcomeMessageMode, +} from 'instabug-reactnative'; import { ListTile } from '../components/ListTile'; import { Screen } from '../components/Screen'; +import { useToast } from 'native-base'; +import { Section } from '../components/Section'; export const BugReportingScreen: React.FC = () => { + const toast = useToast(); return ( Instabug.show()} /> @@ -15,6 +24,59 @@ export const BugReportingScreen: React.FC = () => { onPress={() => BugReporting.show(ReportType.feedback, [InvocationOption.emailFieldHidden])} /> BugReporting.show(ReportType.question, [])} /> + + BugReporting.setExtendedBugReportMode(ExtendedBugReportMode.enabledWithRequiredFields) + } + /> + + BugReporting.setExtendedBugReportMode(ExtendedBugReportMode.enabledWithOptionalFields) + } + /> + Instabug.setSessionProfilerEnabled(true)} + /> + Instabug.showWelcomeMessage(WelcomeMessageMode.beta)} + /> + Instabug.showWelcomeMessage(WelcomeMessageMode.live)} + /> + +
+ + BugReporting.onInvokeHandler(function () { + Instabug.appendTags(['Invocation Handler tag1']); + }) + } + /> + + Instabug.onReportSubmitHandler(() => { + toast.show({ + description: 'Submission succeeded', + }); + }) + } + /> + + BugReporting.onSDKDismissedHandler(function () { + Instabug.setPrimaryColor('#FF0000'); + }) + } + /> +
); };