@layerfi/components 0.1.54 → 0.1.56
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 +11 -11
- package/dist/esm/index.js +2791 -2008
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +253 -9
- package/dist/index.js +2878 -2097
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +163 -3
- package/dist/styles/index.css.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@ yarn install @layerfi/components
|
|
|
31
31
|
|
|
32
32
|
Nest the components you want to use under the `LayerProvider` component. You should provide the component with a few props:
|
|
33
33
|
|
|
34
|
-
- `businessId` The ID of the business whose
|
|
34
|
+
- `businessId` The ID of the business whose information you're showing.
|
|
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
|
+
- `environment` (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
38
|
- `onError` (Optional) to get notified about exceptions
|
|
39
39
|
|
|
@@ -78,13 +78,13 @@ The onboarding component can be included on an accounting landing page to prompt
|
|
|
78
78
|
After connecting accounts, the component will change into a prompt to categorize transactions.
|
|
79
79
|

|
|
80
80
|
|
|
81
|
-
For a business that has already onboarded, this component will render nothing, so it's safe to leave on the default page for all businesses.
|
|
81
|
+
For a business that has already been onboarded, this component will render nothing, so it's safe to leave it on the default page for all businesses.
|
|
82
82
|
|
|
83
83
|
```tsx
|
|
84
84
|
<Onboarding onTransactionsToReviewClick={onTransactionsToReviewClick} />
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
This component has one primary prop: `onTransactionsToReviewClick` should be a function
|
|
87
|
+
This component has one primary prop: `onTransactionsToReviewClick` should be a function that navigates to the bank transactions to review page. For example, if the bank transaction categorization page lives on `/account/bank-transactions` within your app:
|
|
88
88
|
|
|
89
89
|
```tsx
|
|
90
90
|
<Onboarding
|
|
@@ -181,7 +181,7 @@ Props:
|
|
|
181
181
|
- `vertical`: changes the card layout to be vertically stacked instead of horizontal
|
|
182
182
|
- `revenueLabel`: specifiable label for revenue for uses where you prefer 'income' or other another term.
|
|
183
183
|
|
|
184
|
-
Note that the `<TransactionToReviewCard>` is a separate component, but is meant to be optionally bundled with the summary cards. As with the onboarding component, this component has one primary prop: `onTransactionsToReviewClick` should be a function which navigates to the bank transactions to review page. For example, if the bank transaction
|
|
184
|
+
Note that the `<TransactionToReviewCard>` is a separate component, but is meant to be optionally bundled with the summary cards. As with the onboarding component, this component has one primary prop: `onTransactionsToReviewClick` should be a function which navigates to the bank transactions to review page. For example, if the bank transaction categorization page lives on `/account/bank-transactions` within your app:
|
|
185
185
|
|
|
186
186
|
```tsx
|
|
187
187
|
<Onboarding
|
|
@@ -223,7 +223,7 @@ The statement of cashflows component is an interactive table displaying cash cha
|
|
|
223
223
|
|
|
224
224
|

|
|
225
225
|
|
|
226
|
-
The chart of accounts gives direct read
|
|
226
|
+
The chart of accounts gives direct read-and-write access into the double-entry general ledger underlying Layer's data. It exposes the list of accounts and enables users to create new accounts.
|
|
227
227
|
|
|
228
228
|
```tsx
|
|
229
229
|
<ChartOfAccounts asWidget withDateControl withExpandAllButton />
|
|
@@ -232,8 +232,8 @@ The chart of accounts gives direct read and write access into the double entry g
|
|
|
232
232
|
The following props are supported
|
|
233
233
|
|
|
234
234
|
- `asWidget`: Displays a more compact version.
|
|
235
|
-
- `withDateControl`: Includes a date picker
|
|
236
|
-
- `withExpandAllButton`: Optionally displays a button to expand and collapse all sub
|
|
235
|
+
- `withDateControl`: Includes a date picker that determines the effective date of account balances displayed.
|
|
236
|
+
- `withExpandAllButton`: Optionally displays a button to expand and collapse all sub-account lists.
|
|
237
237
|
|
|
238
238
|
#### Journal
|
|
239
239
|
|
|
@@ -263,7 +263,7 @@ You have a range of options for custom styling. In order of most simple to most
|
|
|
263
263
|
|
|
264
264
|
### Using `theme` attribute
|
|
265
265
|
|
|
266
|
-
The theme attribute allows you to set
|
|
266
|
+
The theme attribute allows you to set primary light and dark colors. The component will then use your primary colors to create a cohesive color palette across all components. We won't add any new colors, just different lightness of your brand colors for accents where helpful, e.g. hover states.
|
|
267
267
|
|
|
268
268
|
```ts
|
|
269
269
|
<LayerProvider
|
|
@@ -508,7 +508,7 @@ The full list of variables is listed in the [`variables.css`](https://github.com
|
|
|
508
508
|
|
|
509
509
|
### CSS classes
|
|
510
510
|
|
|
511
|
-
For fine grained control, you can override specific classes. We recommend using your browser dev tools to find the component you want restyle and
|
|
511
|
+
For fine grained control, you can override specific classes. We recommend using your browser dev tools to find the component you want to restyle and override that specific class with a higher priority CSS rule.
|
|
512
512
|
|
|
513
513
|
```css
|
|
514
514
|
body .Layer__table-cell-content {
|
|
@@ -535,7 +535,7 @@ Use `onError` property on `<LayerProvider />` to get notified about all exceptio
|
|
|
535
535
|
</LayerProvider>
|
|
536
536
|
```
|
|
537
537
|
|
|
538
|
-
...or on specific component:
|
|
538
|
+
...or on the specific component:
|
|
539
539
|
|
|
540
540
|
```ts
|
|
541
541
|
<BankTransactions onError={e => console.log('My callback:', e)} />
|