@zahlen/checkout 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +38 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -177,7 +177,24 @@ Zahlen.init({
177
177
  npm install @zahlen/checkout-react
178
178
  ```
179
179
 
180
- See [@zahlen/checkout-react](../zahlen-checkout-react/README.md) for React-specific hooks and components.
180
+ ```tsx
181
+ import { ZahlenButton, ZahlenProvider } from '@zahlen/checkout-react';
182
+
183
+ function App() {
184
+ return (
185
+ <ZahlenProvider apiKey="pk_live_xxx">
186
+ <ZahlenButton
187
+ amount={499900}
188
+ currency="NGN"
189
+ onSuccess={(result) => console.log('Paid!', result)}
190
+ onError={(error) => console.error(error)}
191
+ >
192
+ Pay ₦4,999
193
+ </ZahlenButton>
194
+ </ZahlenProvider>
195
+ );
196
+ }
197
+ ```
181
198
 
182
199
  ### Angular
183
200
 
@@ -185,7 +202,26 @@ See [@zahlen/checkout-react](../zahlen-checkout-react/README.md) for React-speci
185
202
  npm install @zahlen/checkout-angular
186
203
  ```
187
204
 
188
- See [@zahlen/checkout-angular](../zahlen-checkout-angular/README.md) for Angular module and directives.
205
+ ```typescript
206
+ // app.module.ts
207
+ import { ZahlenModule } from '@zahlen/checkout-angular';
208
+
209
+ @NgModule({
210
+ imports: [ZahlenModule.forRoot({ apiKey: 'pk_live_xxx' })]
211
+ })
212
+ export class AppModule {}
213
+ ```
214
+
215
+ ```html
216
+ <!-- component.html -->
217
+ <button zahlenCheckout
218
+ [amount]="499900"
219
+ [currency]="'NGN'"
220
+ (success)="onSuccess($event)"
221
+ (error)="onError($event)">
222
+ Pay ₦4,999
223
+ </button>
224
+ ```
189
225
 
190
226
  ---
191
227
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zahlen/checkout",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Modern, Gen Z-friendly payment checkout modal for the web",
5
5
  "author": "Zahlen",
6
6
  "license": "MIT",