@layerfi/components 0.1.32 → 0.1.34
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 +22 -0
- package/dist/esm/index.js +2695 -2419
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +275 -146
- package/dist/index.js +2735 -2458
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +737 -615
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Nest the components you want to use under the `LayerProvider` component. You sho
|
|
|
35
35
|
- `businessAccessToken` Temporary authentication token scoped to this specific business. See the [getting started guide](https://docs.layerfi.com/guides/embedded-components#backend-setup) for how to fetch these tokens on your backend.
|
|
36
36
|
- `envronment` (Optional, defaults to "production") the Layer environment you're attempting to access [`staging` or `production`]
|
|
37
37
|
- `theme` (Optional) to customize the look of components
|
|
38
|
+
- `onError` (Optional) to get notified about exceptions
|
|
38
39
|
|
|
39
40
|
```tsx
|
|
40
41
|
import { LayerProvider } from "@layerfi/components";
|
|
@@ -518,3 +519,24 @@ body .Layer__bank-transaction-row .Layer__table-cell-content {
|
|
|
518
519
|
background: gray;
|
|
519
520
|
}
|
|
520
521
|
```
|
|
522
|
+
|
|
523
|
+
## Error callback
|
|
524
|
+
|
|
525
|
+
Use `onError` property on `<LayerProvider />` to get notified about all exceptions:
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
<LayerProvider
|
|
529
|
+
businessId="..."
|
|
530
|
+
environment="..."
|
|
531
|
+
appId="..."
|
|
532
|
+
onError={err => console.log('My error callback', err)}
|
|
533
|
+
>
|
|
534
|
+
{...}
|
|
535
|
+
</LayerProvider>
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
...or on specific component:
|
|
539
|
+
|
|
540
|
+
```ts
|
|
541
|
+
<BankTransactions onError={e => console.log('My callback:', e)} />
|
|
542
|
+
```
|