@mercoa/react 0.0.11-rc1 → 0.0.11
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 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,13 @@ The Mercoa React component library uses a [React Context](https://legacy.reactjs
|
|
|
15
15
|
### Basic Usage
|
|
16
16
|
|
|
17
17
|
```javascript
|
|
18
|
+
// First import the base tailwind.css file
|
|
19
|
+
// If you are already using tailwind in your project, you can skip this step
|
|
20
|
+
import '@mercoa/react/dist/tailwind.base.css'
|
|
21
|
+
|
|
22
|
+
// Import the Mercoa styles after the base tailwind.css file or your own tailwind CSS
|
|
18
23
|
import '@mercoa/react/dist/style.css'
|
|
24
|
+
|
|
19
25
|
import { MercoaSession } from '@mercoa/react'
|
|
20
26
|
|
|
21
27
|
export default function Index() {
|
|
@@ -75,10 +81,11 @@ function Example() {
|
|
|
75
81
|
|
|
76
82
|
#### Props
|
|
77
83
|
|
|
78
|
-
| prop
|
|
79
|
-
|
|
|
80
|
-
| invoice
|
|
81
|
-
| invoiceId
|
|
84
|
+
| prop | description | required |
|
|
85
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
|
86
|
+
| invoice | A `Mercoa.InvoiceResponse` object to view/edit. | No |
|
|
87
|
+
| invoiceId | ID of the invoice to view/edit. If `invoice` is passed, this will be ignored. | No |
|
|
88
|
+
| heightOffset | Height offset in pixels. By default, the invoice details component will expand to the full window height. Pass in a hightOffset to shrink the max height of the component. For example, if you have a header that that takes up 150px, you can set a height offset of 200px to give the component enough room to fully render | No (default is 70) |
|
|
82
89
|
|
|
83
90
|
#### Example
|
|
84
91
|
|