@parafin/react 0.0.2 → 1.0.1
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/index.tsx +7 -5
- package/out/index.d.ts +4 -3
- package/out/index.js +4 -3
- package/package.json +2 -2
package/index.tsx
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { openParafinDashboard } from '@parafin/core'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type OptInFields = {
|
|
4
|
+
type OptInFields = {
|
|
7
5
|
businessExternalId: string
|
|
8
6
|
legalBusinessName: string
|
|
9
7
|
dbaName?: string
|
|
@@ -15,6 +13,7 @@ export type OptInFields = {
|
|
|
15
13
|
}[]
|
|
16
14
|
routingNumber?: string
|
|
17
15
|
accountNumberLastFour: string
|
|
16
|
+
bankAccountCurrencyCode?: string
|
|
18
17
|
email: string
|
|
19
18
|
phoneNumber: string
|
|
20
19
|
address: {
|
|
@@ -27,7 +26,7 @@ export type OptInFields = {
|
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
const ParafinWidget = (props: {
|
|
31
30
|
token: string
|
|
32
31
|
product: 'capital' | 'banking'
|
|
33
32
|
externalBusinessId?: string
|
|
@@ -38,7 +37,7 @@ export const ParafinWidget = (props: {
|
|
|
38
37
|
try {
|
|
39
38
|
const iframeRef = useRef<HTMLIFrameElement>(null)
|
|
40
39
|
const [iframeKey, setIframeKey] = useState(0)
|
|
41
|
-
const [iframeHeight, setIframeHeight] = useState('
|
|
40
|
+
const [iframeHeight, setIframeHeight] = useState('258px')
|
|
42
41
|
const [borderColor, setBorderColor] = useState('#E8E8E8')
|
|
43
42
|
const [borderRadius, setBorderRadius] = useState('16px')
|
|
44
43
|
|
|
@@ -112,6 +111,7 @@ export const ParafinWidget = (props: {
|
|
|
112
111
|
backgroundColor: '#fff',
|
|
113
112
|
border: `1px solid ${borderColor}`,
|
|
114
113
|
borderRadius: borderRadius,
|
|
114
|
+
transition: 'border 0.2s, border-radius 0.2s',
|
|
115
115
|
boxSizing: 'border-box',
|
|
116
116
|
}}
|
|
117
117
|
/>
|
|
@@ -120,3 +120,5 @@ export const ParafinWidget = (props: {
|
|
|
120
120
|
console.error('Error loading Parafin widget')
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
export { OptInFields, ParafinWidget }
|
package/out/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type OptInFields = {
|
|
1
|
+
type OptInFields = {
|
|
3
2
|
businessExternalId: string;
|
|
4
3
|
legalBusinessName: string;
|
|
5
4
|
dbaName?: string;
|
|
@@ -11,6 +10,7 @@ export type OptInFields = {
|
|
|
11
10
|
}[];
|
|
12
11
|
routingNumber?: string;
|
|
13
12
|
accountNumberLastFour: string;
|
|
13
|
+
bankAccountCurrencyCode?: string;
|
|
14
14
|
email: string;
|
|
15
15
|
phoneNumber: string;
|
|
16
16
|
address: {
|
|
@@ -22,7 +22,7 @@ export type OptInFields = {
|
|
|
22
22
|
country: string;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
declare const ParafinWidget: (props: {
|
|
26
26
|
token: string;
|
|
27
27
|
product: 'capital' | 'banking';
|
|
28
28
|
externalBusinessId?: string;
|
|
@@ -30,3 +30,4 @@ export declare const ParafinWidget: (props: {
|
|
|
30
30
|
onOptIn?: () => Promise<OptInFields>;
|
|
31
31
|
environment?: string;
|
|
32
32
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export { OptInFields, ParafinWidget };
|
package/out/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { openParafinDashboard } from '@parafin/core';
|
|
4
|
-
|
|
5
|
-
export const ParafinWidget = (props) => {
|
|
4
|
+
const ParafinWidget = (props) => {
|
|
6
5
|
try {
|
|
7
6
|
const iframeRef = useRef(null);
|
|
8
7
|
const [iframeKey, setIframeKey] = useState(0);
|
|
9
|
-
const [iframeHeight, setIframeHeight] = useState('
|
|
8
|
+
const [iframeHeight, setIframeHeight] = useState('258px');
|
|
10
9
|
const [borderColor, setBorderColor] = useState('#E8E8E8');
|
|
11
10
|
const [borderRadius, setBorderRadius] = useState('16px');
|
|
12
11
|
const getBaseUrl = () => {
|
|
@@ -69,6 +68,7 @@ export const ParafinWidget = (props) => {
|
|
|
69
68
|
backgroundColor: '#fff',
|
|
70
69
|
border: `1px solid ${borderColor}`,
|
|
71
70
|
borderRadius: borderRadius,
|
|
71
|
+
transition: 'border 0.2s, border-radius 0.2s',
|
|
72
72
|
boxSizing: 'border-box',
|
|
73
73
|
} }, iframeKey));
|
|
74
74
|
}
|
|
@@ -76,3 +76,4 @@ export const ParafinWidget = (props) => {
|
|
|
76
76
|
console.error('Error loading Parafin widget');
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
+
export { ParafinWidget };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parafin/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Parafin React widget",
|
|
5
5
|
"author": "Parafin (https://www.parafin.com)",
|
|
6
6
|
"module": "out/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"typescript": "^4.9.5"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@parafin/core": "^1.0.
|
|
17
|
+
"@parafin/core": "^1.0.2",
|
|
18
18
|
"react": "^18.2.0"
|
|
19
19
|
}
|
|
20
20
|
}
|