@superlogic/spree-pay 0.0.1

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/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @superlogic/spree-pay
2
+
3
+ Publishable React package exposing the SpreePay component and related utilities.
4
+
5
+ ## Install
6
+
7
+ This package is part of the monorepo. From a consumer app inside the repo:
8
+
9
+ ```sh
10
+ npm i @superlogic/spree-pay
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```tsx
16
+ import { SpreePay, SpreePayProvider } from '@superlogic/spree-pay';
17
+
18
+ export default function Checkout() {
19
+ return (
20
+ <SpreePayProvider
21
+ env={{
22
+ userId: 'user-123',
23
+ stripePublicKey: process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!,
24
+ slapiUrl: process.env.NEXT_PUBLIC_SLAPI_URL!,
25
+ slapiAuthKey: process.env.NEXT_PUBLIC_SLAPI_AUTH_KEY!,
26
+ accessToken: 'optional-access-token',
27
+ }}
28
+ >
29
+ <SpreePay amount="$199.00" />
30
+ </SpreePayProvider>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ## Build
36
+
37
+ ```sh
38
+ npm run build -w @superlogic/spree-pay
39
+ ```
40
+
41
+ ## Publish
42
+
43
+ From the repo root, ensure you're logged in to npm, bump version, then:
44
+
45
+ ```sh
46
+ npm publish -w @superlogic/spree-pay --access public
47
+ ```