@aurora-is-near/intents-swap-widget 2.28.0 → 2.29.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/dist/components/WidgetContainer.d.ts +3 -3
- package/dist/components/WidgetContainer.js +34 -11
- package/dist/components/WidgetContainer.js.map +1 -1
- package/dist/widgets/WidgetDeposit/index.d.ts +3 -2
- package/dist/widgets/WidgetDeposit/index.js +9 -7
- package/dist/widgets/WidgetDeposit/index.js.map +1 -1
- package/dist/widgets/WidgetSwap/index.d.ts +3 -2
- package/dist/widgets/WidgetSwap/index.js +9 -7
- package/dist/widgets/WidgetSwap/index.js.map +1 -1
- package/dist/widgets/WidgetWithdraw/index.d.ts +3 -2
- package/dist/widgets/WidgetWithdraw/index.js +9 -7
- package/dist/widgets/WidgetWithdraw/index.js.map +1 -1
- package/dist/widgets/types.d.ts +0 -4
- package/package.json +1 -1
- package/src/components/WidgetContainer.tsx +14 -3
- package/src/widgets/WidgetDeposit/index.tsx +7 -2
- package/src/widgets/WidgetSwap/index.tsx +7 -2
- package/src/widgets/WidgetWithdraw/index.tsx +8 -2
- package/src/widgets/types.ts +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
type WidgetContainerProps = PropsWithChildren<{
|
|
2
|
+
export type WidgetContainerProps = PropsWithChildren<{
|
|
3
3
|
HeaderComponent?: ReactElement | false | null;
|
|
4
4
|
FooterComponent?: ReactElement | false | null;
|
|
5
5
|
isFullPage?: boolean;
|
|
6
|
+
className?: string;
|
|
6
7
|
}>;
|
|
7
|
-
export declare const WidgetContainer: ({ children, HeaderComponent, FooterComponent, isFullPage, }: WidgetContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
8
|
+
export declare const WidgetContainer: ({ children, HeaderComponent, FooterComponent, isFullPage, className, }: WidgetContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { jsxs as m, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "../constants/chains.js";
|
|
3
|
+
import "viem";
|
|
4
|
+
import "ethers";
|
|
5
|
+
import { cn as s } from "../utils/cn.js";
|
|
6
|
+
const w = ({
|
|
7
|
+
children: c,
|
|
4
8
|
HeaderComponent: e,
|
|
5
9
|
FooterComponent: i,
|
|
6
|
-
isFullPage: t
|
|
10
|
+
isFullPage: t,
|
|
11
|
+
className: r
|
|
7
12
|
}) => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const f = /* @__PURE__ */ m(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: s(
|
|
17
|
+
"w-full h-full flex flex-col justify-center items-center relative",
|
|
18
|
+
t && r
|
|
19
|
+
),
|
|
20
|
+
children: [
|
|
21
|
+
e && /* @__PURE__ */ l("div", { className: "w-full mb-sw-2xl", children: e }),
|
|
22
|
+
c,
|
|
23
|
+
i && /* @__PURE__ */ l("div", { className: "flex flex-col gap-3 items-center w-full mt-sw-2xl", children: i })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
return t ? /* @__PURE__ */ l(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: s(
|
|
31
|
+
"h-full min-h-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0",
|
|
32
|
+
r
|
|
33
|
+
),
|
|
34
|
+
children: /* @__PURE__ */ l("div", { className: "w-full h-full max-w-[456px] min-w-[270px]", children: f })
|
|
35
|
+
}
|
|
36
|
+
) : f;
|
|
14
37
|
};
|
|
15
38
|
export {
|
|
16
|
-
|
|
39
|
+
w as WidgetContainer
|
|
17
40
|
};
|
|
18
41
|
//# sourceMappingURL=WidgetContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetContainer.js","sources":["../../src/components/WidgetContainer.tsx"],"sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\n\
|
|
1
|
+
{"version":3,"file":"WidgetContainer.js","sources":["../../src/components/WidgetContainer.tsx"],"sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { cn } from '../utils';\n\nexport type WidgetContainerProps = PropsWithChildren<{\n HeaderComponent?: ReactElement | false | null;\n FooterComponent?: ReactElement | false | null;\n isFullPage?: boolean;\n className?: string;\n}>;\n\nexport const WidgetContainer = ({\n children,\n HeaderComponent,\n FooterComponent,\n isFullPage,\n className,\n}: WidgetContainerProps) => {\n const jsx = (\n <div\n className={cn(\n 'w-full h-full flex flex-col justify-center items-center relative',\n isFullPage && className,\n )}>\n {HeaderComponent && (\n <div className=\"w-full mb-sw-2xl\">{HeaderComponent}</div>\n )}\n {children}\n {FooterComponent && (\n <div className=\"flex flex-col gap-3 items-center w-full mt-sw-2xl\">\n {FooterComponent}\n </div>\n )}\n </div>\n );\n\n if (!isFullPage) {\n return jsx;\n }\n\n return (\n <div\n className={cn(\n 'h-full min-h-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0',\n className,\n )}>\n <div className=\"w-full h-full max-w-[456px] min-w-[270px]\">{jsx}</div>\n </div>\n );\n};\n"],"names":["WidgetContainer","children","HeaderComponent","FooterComponent","isFullPage","className","jsx","jsxs","cn"],"mappings":";;;;;AAUO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AACF,MAA4B;AAC1B,QAAMC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAJ,KAAcC;AAAA,MAAA;AAAA,MAEf,UAAA;AAAA,QAAAH,KACC,gBAAAI,EAAC,OAAA,EAAI,WAAU,oBAAoB,UAAAJ,GAAgB;AAAA,QAEpDD;AAAA,QACAE,KACC,gBAAAG,EAAC,OAAA,EAAI,WAAU,qDACZ,UAAAH,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKN,SAAKC,IAKH,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAEF,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,6CAA6C,UAAAA,EAAAA,CAAI;AAAA,IAAA;AAAA,EAAA,IAT3DA;AAYX;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WidgetContainerProps } from '../../components/WidgetContainer';
|
|
1
2
|
import { Props } from './WidgetDepositContent';
|
|
2
|
-
export type WidgetDepositProps = Props
|
|
3
|
-
export declare const WidgetDeposit: ({ HeaderComponent, FooterComponent, isFullPage, ...widgetProps }: WidgetDepositProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type WidgetDepositProps = Props & Omit<WidgetContainerProps, 'children'>;
|
|
4
|
+
export declare const WidgetDeposit: ({ HeaderComponent, FooterComponent, isFullPage, className, ...widgetProps }: WidgetDepositProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { WidgetContainer as
|
|
3
|
-
import { WidgetDepositContent as
|
|
4
|
-
const
|
|
2
|
+
import { WidgetContainer as n } from "../../components/WidgetContainer.js";
|
|
3
|
+
import { WidgetDepositContent as p } from "./WidgetDepositContent.js";
|
|
4
|
+
const g = ({
|
|
5
5
|
HeaderComponent: o,
|
|
6
6
|
FooterComponent: i,
|
|
7
7
|
isFullPage: e,
|
|
8
|
-
|
|
8
|
+
className: r,
|
|
9
|
+
...m
|
|
9
10
|
}) => /* @__PURE__ */ t(
|
|
10
|
-
|
|
11
|
+
n,
|
|
11
12
|
{
|
|
13
|
+
className: r,
|
|
12
14
|
isFullPage: e,
|
|
13
15
|
HeaderComponent: o,
|
|
14
16
|
FooterComponent: i,
|
|
15
|
-
children: /* @__PURE__ */ t(
|
|
17
|
+
children: /* @__PURE__ */ t(p, { ...m })
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
g as WidgetDeposit
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/widgets/WidgetDeposit/index.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/widgets/WidgetDeposit/index.tsx"],"sourcesContent":["import {\n WidgetContainer,\n WidgetContainerProps,\n} from '../../components/WidgetContainer';\nimport { Props, WidgetDepositContent } from './WidgetDepositContent';\n\nexport type WidgetDepositProps = Props & Omit<WidgetContainerProps, 'children'>;\n\nexport const WidgetDeposit = ({\n HeaderComponent,\n FooterComponent,\n isFullPage,\n className,\n ...widgetProps\n}: WidgetDepositProps) => (\n <WidgetContainer\n className={className}\n isFullPage={isFullPage}\n HeaderComponent={HeaderComponent}\n FooterComponent={FooterComponent}>\n <WidgetDepositContent {...widgetProps} />\n </WidgetContainer>\n);\n"],"names":["WidgetDeposit","HeaderComponent","FooterComponent","isFullPage","className","widgetProps","jsx","WidgetContainer","WidgetDepositContent"],"mappings":";;;AAQO,MAAMA,IAAgB,CAAC;AAAA,EAC5B,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAAH;AAAA,IACA,YAAAD;AAAA,IACA,iBAAAF;AAAA,IACA,iBAAAC;AAAA,IACA,UAAA,gBAAAI,EAACE,GAAA,EAAsB,GAAGH,EAAA,CAAa;AAAA,EAAA;AACzC;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WidgetContainerProps } from '../../components/WidgetContainer';
|
|
1
2
|
import { Props } from './WidgetSwapContent';
|
|
2
|
-
export type WidgetSwapProps = Props
|
|
3
|
-
export declare const WidgetSwap: ({ HeaderComponent, FooterComponent, isFullPage, ...widgetProps }: WidgetSwapProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type WidgetSwapProps = Props & Omit<WidgetContainerProps, 'children'>;
|
|
4
|
+
export declare const WidgetSwap: ({ HeaderComponent, FooterComponent, isFullPage, className, ...widgetProps }: WidgetSwapProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { WidgetContainer as
|
|
3
|
-
import { WidgetSwapContent as
|
|
4
|
-
const
|
|
2
|
+
import { WidgetContainer as n } from "../../components/WidgetContainer.js";
|
|
3
|
+
import { WidgetSwapContent as p } from "./WidgetSwapContent.js";
|
|
4
|
+
const g = ({
|
|
5
5
|
HeaderComponent: o,
|
|
6
6
|
FooterComponent: r,
|
|
7
7
|
isFullPage: i,
|
|
8
|
-
|
|
8
|
+
className: e,
|
|
9
|
+
...m
|
|
9
10
|
}) => /* @__PURE__ */ t(
|
|
10
|
-
|
|
11
|
+
n,
|
|
11
12
|
{
|
|
13
|
+
className: e,
|
|
12
14
|
isFullPage: i,
|
|
13
15
|
HeaderComponent: o,
|
|
14
16
|
FooterComponent: r,
|
|
15
|
-
children: /* @__PURE__ */ t(
|
|
17
|
+
children: /* @__PURE__ */ t(p, { ...m })
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
g as WidgetSwap
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/widgets/WidgetSwap/index.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/widgets/WidgetSwap/index.tsx"],"sourcesContent":["import {\n WidgetContainer,\n WidgetContainerProps,\n} from '../../components/WidgetContainer';\nimport { Props, WidgetSwapContent } from './WidgetSwapContent';\n\nexport type WidgetSwapProps = Props & Omit<WidgetContainerProps, 'children'>;\n\nexport const WidgetSwap = ({\n HeaderComponent,\n FooterComponent,\n isFullPage,\n className,\n ...widgetProps\n}: WidgetSwapProps) => (\n <WidgetContainer\n className={className}\n isFullPage={isFullPage}\n HeaderComponent={HeaderComponent}\n FooterComponent={FooterComponent}>\n <WidgetSwapContent {...widgetProps} />\n </WidgetContainer>\n);\n"],"names":["WidgetSwap","HeaderComponent","FooterComponent","isFullPage","className","widgetProps","jsx","WidgetContainer","WidgetSwapContent"],"mappings":";;;AAQO,MAAMA,IAAa,CAAC;AAAA,EACzB,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAAH;AAAA,IACA,YAAAD;AAAA,IACA,iBAAAF;AAAA,IACA,iBAAAC;AAAA,IACA,UAAA,gBAAAI,EAACE,GAAA,EAAmB,GAAGH,EAAA,CAAa;AAAA,EAAA;AACtC;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WidgetContainerProps } from '../../components/WidgetContainer';
|
|
1
2
|
import { Props } from './WidgetWithdrawContent';
|
|
2
|
-
export type WidgetWithdrawProps = Props
|
|
3
|
-
export declare const WidgetWithdraw: ({ HeaderComponent, FooterComponent, isFullPage, ...widgetProps }: WidgetWithdrawProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type WidgetWithdrawProps = Props & Omit<WidgetContainerProps, 'children'>;
|
|
4
|
+
export declare const WidgetWithdraw: ({ HeaderComponent, FooterComponent, isFullPage, className, ...widgetProps }: WidgetWithdrawProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { WidgetContainer as
|
|
3
|
-
import { WidgetWithdrawContent as
|
|
4
|
-
const
|
|
2
|
+
import { WidgetContainer as m } from "../../components/WidgetContainer.js";
|
|
3
|
+
import { WidgetWithdrawContent as n } from "./WidgetWithdrawContent.js";
|
|
4
|
+
const f = ({
|
|
5
5
|
HeaderComponent: r,
|
|
6
6
|
FooterComponent: i,
|
|
7
7
|
isFullPage: o,
|
|
8
|
-
|
|
8
|
+
className: e,
|
|
9
|
+
...d
|
|
9
10
|
}) => /* @__PURE__ */ t(
|
|
10
|
-
|
|
11
|
+
m,
|
|
11
12
|
{
|
|
13
|
+
className: e,
|
|
12
14
|
isFullPage: o,
|
|
13
15
|
HeaderComponent: r,
|
|
14
16
|
FooterComponent: i,
|
|
15
|
-
children: /* @__PURE__ */ t(
|
|
17
|
+
children: /* @__PURE__ */ t(n, { ...d })
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
f as WidgetWithdraw
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/widgets/WidgetWithdraw/index.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/widgets/WidgetWithdraw/index.tsx"],"sourcesContent":["import {\n WidgetContainer,\n WidgetContainerProps,\n} from '../../components/WidgetContainer';\nimport { Props, WidgetWithdrawContent } from './WidgetWithdrawContent';\n\nexport type WidgetWithdrawProps = Props &\n Omit<WidgetContainerProps, 'children'>;\n\nexport const WidgetWithdraw = ({\n HeaderComponent,\n FooterComponent,\n isFullPage,\n className,\n ...widgetProps\n}: WidgetWithdrawProps) => (\n <WidgetContainer\n className={className}\n isFullPage={isFullPage}\n HeaderComponent={HeaderComponent}\n FooterComponent={FooterComponent}>\n <WidgetWithdrawContent {...widgetProps} />\n </WidgetContainer>\n);\n"],"names":["WidgetWithdraw","HeaderComponent","FooterComponent","isFullPage","className","widgetProps","jsx","WidgetContainer","WidgetWithdrawContent"],"mappings":";;;AASO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAAH;AAAA,IACA,YAAAD;AAAA,IACA,iBAAAF;AAAA,IACA,iBAAAC;AAAA,IACA,UAAA,gBAAAI,EAACE,GAAA,EAAuB,GAAGH,EAAA,CAAa;AAAA,EAAA;AAC1C;"}
|
package/dist/widgets/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
1
|
import { IntentsTransferArgs, QuoteTransferArgs } from '../types';
|
|
3
2
|
export type TokenInputType = 'source' | 'target';
|
|
4
3
|
export type TokenModalState = 'source' | 'target' | 'none';
|
|
@@ -6,7 +5,4 @@ export type QuoteType = 'exact_in' | 'exact_out';
|
|
|
6
5
|
export type CommonWidgetProps<Msg> = QuoteTransferArgs & IntentsTransferArgs & {
|
|
7
6
|
onMsg?: (msg: Msg) => void;
|
|
8
7
|
isLoading?: boolean;
|
|
9
|
-
HeaderComponent?: ReactElement;
|
|
10
|
-
FooterComponent?: ReactElement;
|
|
11
|
-
isFullPage?: boolean;
|
|
12
8
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
+
import { cn } from '../utils';
|
|
2
3
|
|
|
3
|
-
type WidgetContainerProps = PropsWithChildren<{
|
|
4
|
+
export type WidgetContainerProps = PropsWithChildren<{
|
|
4
5
|
HeaderComponent?: ReactElement | false | null;
|
|
5
6
|
FooterComponent?: ReactElement | false | null;
|
|
6
7
|
isFullPage?: boolean;
|
|
8
|
+
className?: string;
|
|
7
9
|
}>;
|
|
8
10
|
|
|
9
11
|
export const WidgetContainer = ({
|
|
@@ -11,9 +13,14 @@ export const WidgetContainer = ({
|
|
|
11
13
|
HeaderComponent,
|
|
12
14
|
FooterComponent,
|
|
13
15
|
isFullPage,
|
|
16
|
+
className,
|
|
14
17
|
}: WidgetContainerProps) => {
|
|
15
18
|
const jsx = (
|
|
16
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
className={cn(
|
|
21
|
+
'w-full h-full flex flex-col justify-center items-center relative',
|
|
22
|
+
isFullPage && className,
|
|
23
|
+
)}>
|
|
17
24
|
{HeaderComponent && (
|
|
18
25
|
<div className="w-full mb-sw-2xl">{HeaderComponent}</div>
|
|
19
26
|
)}
|
|
@@ -31,7 +38,11 @@ export const WidgetContainer = ({
|
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
return (
|
|
34
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
className={cn(
|
|
43
|
+
'h-full min-h-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0',
|
|
44
|
+
className,
|
|
45
|
+
)}>
|
|
35
46
|
<div className="w-full h-full max-w-[456px] min-w-[270px]">{jsx}</div>
|
|
36
47
|
</div>
|
|
37
48
|
);
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
WidgetContainer,
|
|
3
|
+
WidgetContainerProps,
|
|
4
|
+
} from '../../components/WidgetContainer';
|
|
2
5
|
import { Props, WidgetDepositContent } from './WidgetDepositContent';
|
|
3
6
|
|
|
4
|
-
export type WidgetDepositProps = Props
|
|
7
|
+
export type WidgetDepositProps = Props & Omit<WidgetContainerProps, 'children'>;
|
|
5
8
|
|
|
6
9
|
export const WidgetDeposit = ({
|
|
7
10
|
HeaderComponent,
|
|
8
11
|
FooterComponent,
|
|
9
12
|
isFullPage,
|
|
13
|
+
className,
|
|
10
14
|
...widgetProps
|
|
11
15
|
}: WidgetDepositProps) => (
|
|
12
16
|
<WidgetContainer
|
|
17
|
+
className={className}
|
|
13
18
|
isFullPage={isFullPage}
|
|
14
19
|
HeaderComponent={HeaderComponent}
|
|
15
20
|
FooterComponent={FooterComponent}>
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
WidgetContainer,
|
|
3
|
+
WidgetContainerProps,
|
|
4
|
+
} from '../../components/WidgetContainer';
|
|
2
5
|
import { Props, WidgetSwapContent } from './WidgetSwapContent';
|
|
3
6
|
|
|
4
|
-
export type WidgetSwapProps = Props
|
|
7
|
+
export type WidgetSwapProps = Props & Omit<WidgetContainerProps, 'children'>;
|
|
5
8
|
|
|
6
9
|
export const WidgetSwap = ({
|
|
7
10
|
HeaderComponent,
|
|
8
11
|
FooterComponent,
|
|
9
12
|
isFullPage,
|
|
13
|
+
className,
|
|
10
14
|
...widgetProps
|
|
11
15
|
}: WidgetSwapProps) => (
|
|
12
16
|
<WidgetContainer
|
|
17
|
+
className={className}
|
|
13
18
|
isFullPage={isFullPage}
|
|
14
19
|
HeaderComponent={HeaderComponent}
|
|
15
20
|
FooterComponent={FooterComponent}>
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
WidgetContainer,
|
|
3
|
+
WidgetContainerProps,
|
|
4
|
+
} from '../../components/WidgetContainer';
|
|
2
5
|
import { Props, WidgetWithdrawContent } from './WidgetWithdrawContent';
|
|
3
6
|
|
|
4
|
-
export type WidgetWithdrawProps = Props
|
|
7
|
+
export type WidgetWithdrawProps = Props &
|
|
8
|
+
Omit<WidgetContainerProps, 'children'>;
|
|
5
9
|
|
|
6
10
|
export const WidgetWithdraw = ({
|
|
7
11
|
HeaderComponent,
|
|
8
12
|
FooterComponent,
|
|
9
13
|
isFullPage,
|
|
14
|
+
className,
|
|
10
15
|
...widgetProps
|
|
11
16
|
}: WidgetWithdrawProps) => (
|
|
12
17
|
<WidgetContainer
|
|
18
|
+
className={className}
|
|
13
19
|
isFullPage={isFullPage}
|
|
14
20
|
HeaderComponent={HeaderComponent}
|
|
15
21
|
FooterComponent={FooterComponent}>
|
package/src/widgets/types.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
1
|
import { IntentsTransferArgs, QuoteTransferArgs } from '../types';
|
|
3
2
|
|
|
4
3
|
export type TokenInputType = 'source' | 'target';
|
|
@@ -9,7 +8,4 @@ export type CommonWidgetProps<Msg> = QuoteTransferArgs &
|
|
|
9
8
|
IntentsTransferArgs & {
|
|
10
9
|
onMsg?: (msg: Msg) => void;
|
|
11
10
|
isLoading?: boolean;
|
|
12
|
-
HeaderComponent?: ReactElement;
|
|
13
|
-
FooterComponent?: ReactElement;
|
|
14
|
-
isFullPage?: boolean;
|
|
15
11
|
};
|