@trycourier/react-provider 7.4.1-internal.a12e91f.0 → 7.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -15
  2. package/package.json +8 -9
package/README.md CHANGED
@@ -1,9 +1,15 @@
1
+ ## 🚨 THIS PROJECT HAS MOVED 🚨
2
+
3
+ **This repository is deprecated. For the latest features, bug fixes, and more, visit [Courier React SDK documentation](https://www.courier.com/docs/sdk-libraries/courier-react-web) or upgrade using the [v8 Migration Guide](https://www.courier.com/docs/sdk-libraries/courier-react-v8-migration-guide).**
4
+
5
+ ---
6
+
1
7
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
2
8
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3
9
 
4
10
  - [Version 5.X CSP Migration](#version-5-csp-migration)
5
11
  - [Props](#props)
6
- - [Listening to Messsages](#listening-to-messsages)
12
+ - [Listening to Messages](#listening-to-messages)
7
13
  - [Dark Mode / Theme Variables](#dark-mode--theme-variables)
8
14
 
9
15
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -84,7 +90,7 @@ interface Brand {
84
90
 
85
91
  <a name="1listening-to-messagesmd"></a>
86
92
 
87
- ### [Listening to Messsages](#listening)
93
+ ### [Listening to Messages](#listening)
88
94
 
89
95
  There are a few ways to listen for messages and being able react.
90
96
 
@@ -94,7 +100,7 @@ There are a few ways to listen for messages and being able react.
94
100
  import { CourierProvider } from "@trycourier/react-provider";
95
101
 
96
102
  const MyApp = ({ children }) => {
97
- const handleOnMessage = (messsage: IInboxMessagePreview) => {
103
+ const handleOnMessage = (message: IInboxMessagePreview) => {
98
104
  console.log(message);
99
105
  return message;
100
106
  };
@@ -176,34 +182,41 @@ import { CourierProvider } from "@trycourier/react-provider";
176
182
 
177
183
  const MyApp = ({ children }) => {
178
184
  return (
179
- <CourierProvider thene={{ colorMode: "dark" }}>{children}</CourierProvider>
185
+ <CourierProvider theme={{ colorMode: "dark" }}>{children}</CourierProvider>
180
186
  );
181
187
  };
182
188
  ```
183
189
 
184
- You can customize darkmode by passing in variables to the root level theme:
190
+ You can customize dark mode by passing in variables to the root level theme:
185
191
 
186
- ````typescript
192
+ ```typescript
187
193
  export interface ThemeVariables {
188
194
  background?: string;
189
195
  textColor?: string;
190
196
  titleColor?: string;
191
197
  structure?: string;
192
198
  icon?: string;
193
- }```
199
+ }
200
+ ```
194
201
 
195
202
  ```tsx
196
203
  import { CourierProvider } from "@trycourier/react-provider";
197
204
 
198
205
  const MyApp = ({ children }) => {
199
206
  return (
200
- <CourierProvider thene={{variables: {
201
- background: "red",
202
- textColor: "blue",
203
- titleColor: "green",
204
- structure: "pink",
205
- icon: "orange"
206
- }}}>{children}</CourierProvider>
207
+ <CourierProvider
208
+ theme={{
209
+ variables: {
210
+ background: "red",
211
+ textColor: "blue",
212
+ titleColor: "green",
213
+ structure: "pink",
214
+ icon: "orange",
215
+ },
216
+ }}
217
+ >
218
+ {children}
219
+ </CourierProvider>
207
220
  );
208
221
  };
209
- ````
222
+ ```
package/package.json CHANGED
@@ -1,28 +1,27 @@
1
1
  {
2
2
  "name": "@trycourier/react-provider",
3
- "version": "7.4.1-internal.a12e91f.0+a12e91f",
3
+ "version": "7.4.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "typings/index.d.ts",
7
7
  "scripts": {
8
8
  "babel": "babel src -d dist --extensions \".ts,.tsx\" --ignore \"src/**/__tests__/**\" --ignore \"src/**/__mocks__/**\"",
9
9
  "build:watch": "yarn babel --watch",
10
- "build": "rimraf dist && yarn babel",
11
- "clean": "rimraf dist && rimraf typings",
10
+ "build": "node ../../scripts/rm.js dist && yarn babel",
11
+ "clean": "node ../../scripts/rm.js dist typings",
12
12
  "readme": "concat-md --toc --decrease-title-levels --dir-name-as-title docs > README.md",
13
13
  "type-check": "tsc --noEmit",
14
- "types": "rimraf typings && tsc --emitDeclarationOnly"
14
+ "types": "node ../../scripts/rm.js typings && tsc --emitDeclarationOnly"
15
15
  },
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@trycourier/client-graphql": "^7.4.1-internal.a12e91f.0+a12e91f",
19
- "@trycourier/core": "^7.4.1-internal.a12e91f.0+a12e91f",
18
+ "@trycourier/client-graphql": "^7.4.6",
19
+ "@trycourier/core": "^7.4.6",
20
20
  "@trycourier/courier-js": "^1.4.2",
21
- "@trycourier/transport": "^7.4.1-internal.a12e91f.0+a12e91f",
21
+ "@trycourier/transport": "^7.4.6",
22
22
  "buffer": "^6.0.3",
23
23
  "jwt-decode": "^4.0.0",
24
24
  "react-use": "^17.2.1",
25
- "rimraf": "^5.0.0",
26
25
  "urql": "^2.0.1",
27
26
  "uuid": "^9.0.0"
28
27
  },
@@ -34,5 +33,5 @@
34
33
  "dist/",
35
34
  "typings/"
36
35
  ],
37
- "gitHead": "a12e91fa472d20687719635286e9b20c725613bc"
36
+ "gitHead": "39944f8461b285f34ae186bfbf5c70e9ab081875"
38
37
  }