@cryptocadet/react-crypto-pay 2.1.0 → 2.2.0

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 CHANGED
@@ -17,7 +17,7 @@ React-Crypto-Pay requires [Node.js](https://nodejs.org/) v16+ to run.
17
17
  Install the dependencies and devDependencies and start the server.
18
18
 
19
19
  ```sh
20
- npm install @cryptocadet/react-crypto-pay @coinbase/wallet-sdk @walletconnect/ethereum-provider axios react react-dom styled-components web3modal
20
+ npm install @cryptocadet/react-crypto-pay
21
21
  ```
22
22
 
23
23
  ## NextJS
@@ -25,7 +25,7 @@ npm install @cryptocadet/react-crypto-pay @coinbase/wallet-sdk @walletconnect/et
25
25
  In order to install for NextJS, the CryptoPay Modal must be imported dynamically:
26
26
 
27
27
  ```sh
28
- npm install @cryptocadet/react-crypto-pay @coinbase/wallet-sdk @walletconnect/ethereum-provider axios react react-dom styled-components web3modal
28
+ npm install @cryptocadet/react-crypto-pay
29
29
  ```
30
30
 
31
31
  Create a components folder within your app or src folder, and create a new file.
@@ -36,11 +36,14 @@ const ComponentName = () => {
36
36
 
37
37
  return (
38
38
 
39
- <CryptoPayModal
40
- apiKey={'YOUR_API_KEY'}
41
- productId={'YOUR_PROD_ID'}
42
- requireWalletConnection={true}
43
- label="BUTTON TITLE"
39
+ <CryptoPayButton
40
+ apiKey={'YOUR_API_KEY'}
41
+ productId={'YOUR_PRODUCT_ID'}
42
+ email='required'
43
+ shippingAddress='required'
44
+ label='BUTTON TITLE'
45
+ style={null}
46
+
44
47
  />
45
48
 
46
49
  )
@@ -49,6 +52,8 @@ const ComponentName = () => {
49
52
  export default ComponentName;
50
53
  ```
51
54
 
55
+ The 'email' and 'shippingAddress' variables can be required in order to request the user's email and shipping address upon payment. Styles can be input via the style variable to change the button style.
56
+
52
57
  In your page or index file, dynamically import the created component:
53
58
 
54
59
  ```sh
@@ -63,7 +68,7 @@ export default function Home() {
63
68
 
64
69
  ## Styles
65
70
 
66
- React Crypto Pay Modal style can be customized by targeting the cryptopaymodal and cryptopaybutton classes and the style tag in JSX. Web3Modal styles can be imported by adding the following in the component file:
71
+ React Crypto Pay Button style can be customized by targeting the cryptopaymodal and cryptopaybutton classes and the style tag in JSX. Web3Modal styles can be imported by adding the following in the component file:
67
72
 
68
73
  ```sh
69
74
  import 'react-crypto-pay/dist/style.css'