You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/react-native/user-feedback/configuration/index.mdx
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ The following options can be configured for the integration in `feedbackIntegrat
34
34
|`showName`|`boolean`|`true`| Displays the name field on the feedback widget. |
35
35
|`showEmail`|`boolean`|`true`| Displays the email field on the feedback widget. |
36
36
|`enableScreenshot`|`boolean`|`false`| Allows the user to send a screenshot attachment with their feedback. |
37
+
|`enableTakeScreenshot`|`boolean`|`false`| Determines whether the "Take Screenshot" button is displayed. |
37
38
|`isNameRequired`|`boolean`|`false`| Requires the name field on the feedback widget to be filled in. |
38
39
|`isEmailRequired`|`boolean`|`false`| Requires the email field on the feedback widget to be filled in. |
39
40
|`shouldValidateEmail`|`boolean`|`true`| If set the email is validated with the following regular expression `"/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/"`|
@@ -53,6 +54,7 @@ The following options can be configured for the integration in `feedbackIntegrat
53
54
|`cancelButtonLabel`|`"Cancel"`| The label of cancel buttons used in the feedback widget. |
54
55
|`addScreenshotButtonLabel`|`"Add a screenshot"`| The label of the button to add a screenshot to the widget. |
55
56
|`removeScreenshotButtonLabel`|`"Remove screenshot"`| The label of the button to remove the screenshot. |
57
+
|`captureScreenshotButtonLabel`|`"Take a screenshot"`| The label for the button that shows the capture screenshot button. |
56
58
|`nameLabel`|`"Name"`| The label of the name input field. |
57
59
|`namePlaceholder`|`"Your Name"`| The placeholder for the name input field. |
58
60
|`emailLabel`|`"Email"`| The label of the email input field. |
@@ -239,6 +241,42 @@ Sentry.feedbackIntegration({
239
241
});
240
242
```
241
243
244
+
### Screenshot Button
245
+
246
+
You can show a button that allows the user to take a screenshot in the Feedback Widget. The button is shown when `enableTakeScreenshot` is set to `true` in the `feedbackIntegration` method like in the example below.
247
+
248
+
```javascript
249
+
import*asSentryfrom"@sentry/react-native";
250
+
251
+
Sentry.feedbackIntegration({
252
+
enableTakeScreenshot:true,
253
+
screenshotButtonOptions: {
254
+
styles: {
255
+
triggerButton: {
256
+
marginBottom:75,
257
+
},
258
+
},
259
+
},
260
+
})
261
+
262
+
Sentry.showFeedbackButton();
263
+
```
264
+
265
+
You can customize the Feedback Widget screenshot button text with the following options.
|`triggerButton`|`ViewStyle`| The screenshot button style. |
277
+
|`triggerText`|`TextStyle`| The screenshot button text style. |
278
+
|`triggerIcon`|`ImageStyle`| The screenshot button icon style. |
279
+
242
280
## Theming
243
281
244
282
You can also customize the Feedback Widget colors to match your app's theme. The example below shows how to customize the widget backgroung and foreground for the light and dark system themes with the `feedbackIntegration`.
0 commit comments