Skip to content

Commit 74ff15c

Browse files
committed
Adds feedback theme docs
1 parent b1be9ab commit 74ff15c

File tree

1 file changed

+39
-0
lines changed
  • docs/platforms/react-native/user-feedback/configuration

1 file changed

+39
-0
lines changed

docs/platforms/react-native/user-feedback/configuration/index.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,42 @@ Sentry.feedbackIntegration({
238238
onAddScreenshot={handleChooseImage}
239239
});
240240
```
241+
242+
## Theming
243+
244+
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`.
245+
246+
```javascript
247+
import * as Sentry from "@sentry/react-native";
248+
249+
Sentry.feedbackIntegration({
250+
colorScheme: 'system',
251+
themeLight: {
252+
foreground: '#ff0000',
253+
background: '#00ff00',
254+
},
255+
themeDark: {
256+
foreground: '#00ff00',
257+
background: '#ff0000',
258+
},
259+
}),
260+
```
261+
262+
The available theme options are:
263+
264+
| Key | Type | Default | Description |
265+
| ------------- | ----------------------------| ---------- | -------------------------------------------------------- |
266+
| `colorScheme` | `"system", "light", "dark"` | `"system"` | The color theme. "system" will use your OS color scheme. |
267+
| `themeLight` | Feedback Widget Theme | - | The light color scheme. |
268+
| `themeDark` | Feedback Widget Theme | - | The dark color scheme. |
269+
270+
For each theme you can set the following colors:
271+
272+
| Key | Description |
273+
| ------------------ | ----------------------------------------|
274+
| `background` | Background color for surfaces. |
275+
| `foreground` | Foreground color (i.e. text color). |
276+
| `accentForeground` | Foreground color for accented elements. |
277+
| `accentBackground` | Background color for accented elements. |
278+
| `border` | Border color. |
279+
| `feedbackIcon` | Color for feedback icon. |

0 commit comments

Comments
 (0)