Skip to content

Commit cc6fc0c

Browse files
authored
feat: Add dark theme support
2 parents aef8999 + 41daf99 commit cc6fc0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4336
-7108
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2017-2021 Chatwoot Inc.
3+
Copyright (c) 2017-2023 Chatwoot Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ chatwoot-react-native-widget
77
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
88
![](https://img.shields.io/npm/l/@chatwoot/@chatwoot/react-native-widget)
99

10-
- **Supported Chatwoot version:** 1.18.0+
10+
- **Supported Chatwoot version:** 2.16.0+
1111

1212
<img src="https://user-images.githubusercontent.com/12408980/203909820-938136a6-bf5b-433e-9f68-d7f28a1303be.png" alt="screenshot" width="350">
1313

@@ -61,6 +61,7 @@ const App = () => {
6161
const websiteToken = 'WEBSITE_TOKEN';
6262
const baseUrl = 'CHATWOOT_INSTALLATION_URL';
6363
const locale = 'en';
64+
const colorScheme='dark'
6465
6566
return (
6667
<SafeAreaView style={styles.container}>
@@ -79,6 +80,7 @@ const App = () => {
7980
isModalVisible={showWidget}
8081
user={user}
8182
customAttributes={customAttributes}
83+
colorScheme={colorScheme}
8284
/>
8385
}
8486
@@ -142,6 +144,12 @@ The whole example is in the `/example` folder.
142144
<td>Website channel token</td>
143145
</tr>
144146
<tr>
147+
<td>colorScheme</td>
148+
<td> light </td>
149+
<td> String </td>
150+
<td>Widget color scheme (light/dark/auto)</td>
151+
</tr>
152+
<tr>
145153
<td>locale</td>
146154
<td> en </td>
147155
<td> String </td>
@@ -180,4 +188,4 @@ Feel free to send us feedback on [Twitter](https://twitter.com/chatwootapp) or [
180188

181189
If there's anything you'd like to chat about, please feel free to join our [Discord](https://discord.gg/cJXdrwS) chat!
182190

183-
_Chatwoot_ &copy; 2017-2022, Chatwoot Inc - Released under the MIT License.
191+
_Chatwoot_ &copy; 2017-2023, Chatwoot Inc - Released under the MIT License.

examples/.buckconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

examples/.flowconfig

Lines changed: 0 additions & 66 deletions
This file was deleted.

examples/.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/.gitignore

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -28,32 +29,35 @@ build/
2829
.gradle
2930
local.properties
3031
*.iml
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
3136

3237
# node.js
3338
#
3439
node_modules/
3540
npm-debug.log
3641
yarn-error.log
3742

38-
# BUCK
39-
buck-out/
40-
\.buckd/
41-
*.keystore
42-
!debug.keystore
43-
4443
# fastlane
4544
#
4645
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4746
# screenshots whenever they are needed.
4847
# For more information about the recommended setup visit:
4948
# https://docs.fastlane.tools/best-practices/source-control/
5049

51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
5454

5555
# Bundle artifact
5656
*.jsbundle
5757

58-
# CocoaPods
58+
# Ruby / CocoaPods
5959
/ios/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*

examples/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

examples/.prettierrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
bracketSpacing: false,
3-
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
6-
arrowParens: 'avoid',
77
};

examples/.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)