@@ -7,7 +7,13 @@ Seam React component library.
7
7
8
8
## Description
9
9
10
- Zero-backend beautiful drop-in pre-built components with everything you need to get started with Seam.
10
+ Zero-backend beautiful drop-in pre-built components
11
+ with everything you need to get started with [ Seam] .
12
+
13
+ Play with them live in the [ Storybook] !
14
+
15
+ [ Seam ] : https://www.seam.co/
16
+ [ Storybook ] : https://seam-react.vercel.app/
11
17
12
18
## Installation
13
19
@@ -19,6 +25,31 @@ $ npm install @seamapi/react
19
25
20
26
[ npm ] : https://www.npmjs.com/
21
27
28
+ ## Usage
29
+
30
+ > Check out the [ full example app] ( ./examples/basic ) !
31
+
32
+ 1 . Obtain a publishable key from the [ Seam Console] .
33
+ 2 . Wrap your app with the ` SeamProvider ` .
34
+ 3 . Drop in Seam components.
35
+
36
+ ``` ts
37
+ import { SeamProvider , DeviceManager } from ' @seamapi/react'
38
+
39
+ export const App = () => {
40
+ return (
41
+ <SeamProvider >
42
+ <main >
43
+ <h1 >My App < / h1 >
44
+ < DeviceManager / >
45
+ < / main >
46
+ < / SeamProvider >
47
+ )
48
+ }
49
+ ```
50
+
51
+ [ Seam Console ] : https://console.seam.co/
52
+
22
53
## Development and Testing
23
54
24
55
### Quickstart
@@ -28,7 +59,7 @@ $ git clone https://github.com/seamapi/react.git
28
59
$ cd react
29
60
$ nvm install
30
61
$ npm install
31
- $ npm run test:watch
62
+ $ npm start
32
63
```
33
64
34
65
Primary development tasks are defined under ` scripts ` in ` package.json `
53
84
### Requirements
54
85
55
86
You will need [ Node.js] with [ npm] and a [ Node.js debugging] client.
87
+ Alternately, develop in the cloud with [ Codespaces] .
88
+
89
+ [ codespaces ] : https://github.com/features/codespaces
56
90
57
91
Be sure that all commands run under the correct Node version, e.g.,
58
92
if using [ nvm] , install the correct version with
@@ -78,6 +112,51 @@ $ npm install
78
112
[ npm ] : https://www.npmjs.com/
79
113
[ nvm ] : https://github.com/creationix/nvm
80
114
115
+ ### Storybook
116
+
117
+ Develop components with [ Storybook] .
118
+
119
+ Run Storybook in development mode with
120
+
121
+ ```
122
+ $ npm start
123
+ ```
124
+
125
+ The Storybook is deployed in docs mode.
126
+ Develop the Storybook in docs mode with
127
+
128
+ ```
129
+ $ npm run docs:start
130
+ ```
131
+
132
+ [ Storybook ] : https://storybook.js.org/
133
+
134
+ ### Previews
135
+
136
+ Every pull request deploys the Storybook with the examples
137
+ in a [ Vercel Preview Deployment]
138
+ where you may [ comment directly on the preview] [ Vercel Comments ] .
139
+
140
+ [ Vercel Preview Deployment ] : https://vercel.com/docs/concepts/deployments/preview-deployments
141
+ [ Vercel Comments ] : https://vercel.com/docs/concepts/deployments/comments
142
+
143
+ ### Tests
144
+
145
+ Write tests with [ Jest] .
146
+
147
+ [ Jest ] : https://jestjs.io/
148
+
149
+ ### Examples
150
+
151
+ Find fully working examples apps under ` examples/ ` .
152
+ Each example app is built and deployed along with the Storybook documentation.
153
+
154
+ Run and develop an example with, e.g.,
155
+
156
+ ```
157
+ $ npm run example:basic
158
+ ```
159
+
81
160
### Publishing
82
161
83
162
#### Automatic
0 commit comments