Skip to content

Commit ab17445

Browse files
antonislucas-zimermankrystofwoldrich
authored
RN: Adds feedback widget theme documentation (#13513)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ⚠️ PR Chain: - #13512 - 👉 #13513 - #13515 ## DESCRIBE YOUR PR *Tell us what you're changing and why. If your PR **resolves an issue**, please link it so it closes automatically.* Adds feedback widget theme documentation. Part of getsentry/sentry-react-native#4302 Implementation PR: getsentry/sentry-react-native#4677 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ Should be merged after getsentry/sentry-react-native#4726 is released ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com> Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
1 parent 42500ad commit ab17445

File tree

1 file changed

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

1 file changed

+43
-0
lines changed

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,46 @@ Sentry.feedbackIntegration({
247247
onAddScreenshot={handleChooseImage}
248248
});
249249
```
250+
251+
## Theming
252+
253+
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`.
254+
255+
```javascript
256+
import * as Sentry from "@sentry/react-native";
257+
258+
Sentry.init({
259+
integrations: [
260+
Sentry.feedbackIntegration({
261+
colorScheme: 'system',
262+
themeLight: {
263+
foreground: '#ff0000',
264+
background: '#00ff00',
265+
},
266+
themeDark: {
267+
foreground: '#00ff00',
268+
background: '#ff0000',
269+
},
270+
}),
271+
],
272+
});
273+
```
274+
275+
The available theme options are:
276+
277+
| Key | Type | Default | Description |
278+
| ------------- | ----------------------------| ---------- | -------------------------------------------------------- |
279+
| `colorScheme` | `"system", "light", "dark"` | `"system"` | The color theme. "system" will use your OS color scheme. |
280+
| `themeLight` | Feedback Widget Theme | - | The light color scheme. |
281+
| `themeDark` | Feedback Widget Theme | - | The dark color scheme. |
282+
283+
For each theme you can set the following colors:
284+
285+
| Key | Description |
286+
| ------------------ | ----------------------------------------|
287+
| `background` | Background color for surfaces. |
288+
| `foreground` | Foreground color (i.e. text color). |
289+
| `accentForeground` | Foreground color for accented elements. |
290+
| `accentBackground` | Background color for accented elements. |
291+
| `border` | Border color. |
292+
| `feedbackIcon` | Color for feedback icon. |

0 commit comments

Comments
 (0)