Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/platforms/react-native/user-feedback/configuration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,46 @@ Sentry.feedbackIntegration({
onAddScreenshot={handleChooseImage}
});
```

## Theming

You can also customize the Feedback Widget colors to match your app's theme. The example below shows how to customize the widget background and foreground for the light and dark system themes with the `feedbackIntegration`.

```javascript
import * as Sentry from "@sentry/react-native";

Sentry.init({
integrations: [
Sentry.feedbackIntegration({
colorScheme: 'system',
themeLight: {
foreground: '#ff0000',
background: '#00ff00',
},
themeDark: {
foreground: '#00ff00',
background: '#ff0000',
},
}),
],
});
```

The available theme options are:

| Key | Type | Default | Description |
| ------------- | ----------------------------| ---------- | -------------------------------------------------------- |
| `colorScheme` | `"system", "light", "dark"` | `"system"` | The color theme. "system" will use your OS color scheme. |
| `themeLight` | Feedback Widget Theme | - | The light color scheme. |
| `themeDark` | Feedback Widget Theme | - | The dark color scheme. |

For each theme you can set the following colors:

| Key | Description |
| ------------------ | ----------------------------------------|
| `background` | Background color for surfaces. |
| `foreground` | Foreground color (i.e. text color). |
| `accentForeground` | Foreground color for accented elements. |
| `accentBackground` | Background color for accented elements. |
| `border` | Border color. |
| `feedbackIcon` | Color for feedback icon. |