Skip to content

Commit 075f030

Browse files
committed
Use colorScheme
1 parent 606fc5a commit 075f030

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare module '@chatwoot/react-native-widget' {
55
websiteToken: string;
66
locale?: string;
77
baseUrl: string;
8-
theme?: string;
8+
colorScheme?: 'light' | 'auto' | 'dark';
99
closeModal: () => void;
1010
isModalVisible: boolean;
1111
user?: {

src/WebView.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const propTypes = {
77
websiteToken: PropTypes.string.isRequired,
88
baseUrl: PropTypes.string.isRequired,
99
cwCookie: PropTypes.string,
10-
theme: PropTypes.string,
10+
colorScheme: PropTypes.string,
1111
user: PropTypes.shape({
1212
name: PropTypes.string,
1313
avatar_url: PropTypes.string,
@@ -24,15 +24,15 @@ const defaultProps = {
2424
user: {},
2525
locale: 'en',
2626
customAttributes: {},
27-
theme: 'light',
27+
colorScheme: 'light',
2828
};
2929

3030
const WebViewComponent = ({
3131
baseUrl,
3232
websiteToken,
3333
cwCookie,
3434
locale,
35-
theme,
35+
colorScheme,
3636
user,
3737
customAttributes,
3838
closeModal,
@@ -46,7 +46,7 @@ const WebViewComponent = ({
4646
user,
4747
locale,
4848
customAttributes,
49-
theme,
49+
colorScheme,
5050
});
5151

5252
const onShouldStartLoadWithRequest = (request) => {

0 commit comments

Comments
 (0)