@stytch/react 19.4.1 → 19.4.2
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.
- package/CHANGELOG.md +6 -0
- package/README.md +10 -13
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -4,12 +4,15 @@ Stytch's React Library
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
With `npm
|
|
8
|
-
|
|
7
|
+
With `npm`:
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install @stytch/react @stytch/vanilla-js --save
|
|
11
|
+
```
|
|
9
12
|
|
|
10
13
|
## Documentation
|
|
11
14
|
|
|
12
|
-
For full documentation please refer to Stytch's javascript SDK documentation at https://stytch.com/docs/sdks
|
|
15
|
+
For full documentation please refer to Stytch's javascript SDK documentation at https://stytch.com/docs/sdks.
|
|
13
16
|
|
|
14
17
|
## Example Usage
|
|
15
18
|
|
|
@@ -20,11 +23,10 @@ import { StytchUIClient } from '@stytch/vanilla-js';
|
|
|
20
23
|
const stytch = new StytchUIClient('public-token-<find yours in the stytch dashboard>');
|
|
21
24
|
|
|
22
25
|
// Wrap your App in the StytchProvider
|
|
23
|
-
|
|
26
|
+
const Root = () => (
|
|
24
27
|
<StytchProvider stytch={stytch}>
|
|
25
28
|
<App />
|
|
26
|
-
</StytchProvider
|
|
27
|
-
document.getElementById('root'),
|
|
29
|
+
</StytchProvider>
|
|
28
30
|
);
|
|
29
31
|
|
|
30
32
|
// Now use Stytch in your components
|
|
@@ -43,22 +45,17 @@ const App = () => {
|
|
|
43
45
|
styles: {
|
|
44
46
|
container: { width: '321px' },
|
|
45
47
|
colors: { primary: '#0577CA' },
|
|
46
|
-
fontFamily: '"Helvetica
|
|
48
|
+
fontFamily: '"Helvetica Neue", Helvetica, sans-serif',
|
|
47
49
|
},
|
|
48
50
|
callbacks: {
|
|
49
51
|
onEvent: (message) => console.log(message),
|
|
50
|
-
onSuccess: (message) => console.log(message),
|
|
51
52
|
onError: (message) => console.log(message),
|
|
52
53
|
},
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
57
|
<div id="login">
|
|
57
|
-
<StytchLogin
|
|
58
|
-
config={stytchProps.loginOrSignupView}
|
|
59
|
-
styles={stytchProps.styles}
|
|
60
|
-
callbacks={stytchProps.callbacks}
|
|
61
|
-
/>
|
|
58
|
+
<StytchLogin config={stytchProps.config} styles={stytchProps.styles} callbacks={stytchProps.callbacks} />
|
|
62
59
|
</div>
|
|
63
60
|
);
|
|
64
61
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stytch/react",
|
|
3
|
-
"version": "19.4.
|
|
3
|
+
"version": "19.4.2",
|
|
4
4
|
"description": "Stytch's official React Library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@babel/runtime": "7.26.10",
|
|
36
36
|
"@stytch/internal-tsconfigs": "0.0.0",
|
|
37
37
|
"@stytch/js-utils": "0.0.1",
|
|
38
|
-
"@stytch/vanilla-js": "5.
|
|
38
|
+
"@stytch/vanilla-js": "5.21.1",
|
|
39
39
|
"@testing-library/react": "14.0.0",
|
|
40
40
|
"@types/jest": "29.5.14",
|
|
41
41
|
"eslint-config-custom": "0.0.1",
|