@layerfi/components 0.1.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 ADDED
@@ -0,0 +1,70 @@
1
+ # Layer Financial React Components
2
+
3
+ This is a Javascript library that provides easy access to Layer Financial's
4
+ acounting offering through React components.
5
+
6
+ ## Installation
7
+
8
+ ```
9
+ npm install --save @layerfi/components
10
+ ```
11
+ or
12
+ ```
13
+ yarn install @layerfi/components
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ Nest the components you want to use under the `LayerProvider` component. You
19
+ need to provide the component with a few props, though:
20
+
21
+ * `appId` Your appId
22
+ * `appSecret` A secret for signing in to Layer
23
+ * `businessId` The ID of the business whose infomation you're showing.
24
+ * `clientId` The ID of the application you're writing
25
+ * `envronment` (Optional, defaults to "production") the Layer environment you're
26
+ attempting to access ["staging" or "production"]
27
+
28
+ ```
29
+ import { LayerProvider } from "@layerfi/components";
30
+ ...
31
+ <LayerProvider
32
+ appId="..."
33
+ appSecret="..."
34
+ businessId="..."
35
+ clientId="..."
36
+ >
37
+ {...}
38
+ </LayerProvider>
39
+ ```
40
+
41
+ ## Bank Transactions
42
+
43
+ ```
44
+ import { BankTransactions } from "@layerfi/components";
45
+
46
+ <BankTransactions/>
47
+ ```
48
+
49
+ ## Profit And Loss
50
+
51
+ You can rearrange the order as you like.
52
+
53
+ ```
54
+ import { ProfitAndLoss } from "@layerfi/components";
55
+
56
+ <ProfitAndLoss>
57
+ <ProfitAndLoss.Chart />
58
+ <ProfitAndLoss.Summaries />
59
+ <ProfitAndLoss.DatePicker />
60
+ <ProfitAndLoss.Table />
61
+ </ProfitAndLoss>
62
+ ```
63
+
64
+ ## Balance Sheet
65
+
66
+ ```
67
+ import { BalanceSheet } from "@layerfi/components";
68
+
69
+ <BalanceSheet/>
70
+ ```